Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Finance forum

Trace (Log)

(0) ShareShare
ReportReport
Posted on by 1,054

Hi Experts,

Can any one share you knowledge on, is it possible to use 'nlog' dll to develop logging and tracing functionality in D365FO.

Thanks in advance

Guru

  • Martin Dráb Profile Picture
    232,866 Most Valuable Professional on at
    RE: Trace (Log)

    In this particular case, you would have to enable Debug log.

    Select AX-WorkflowRuntime and from Actions (the panel on the right edge) select View > Show Analytic and Debug Logs. Then select the Debug log and click Enable Log (in the Action panel).

  • Guruprasanna Profile Picture
    1,054 on at
    RE: Trace (Log)

    Thanks for quick response,

    I have tried using below code in runnable class.

    WorkflowTrace::Log("Test",TraceLevel::Verbose, TraceOrigin::WFRuntime);

    WorkflowTrace::Log("test",TraceLevel::Info, TraceOrigin::WFRuntime);

    Unfortunately not able to see "Test" message in event viewer.

    2211.Capture.PNG

    Thank you

    Guru

  • Suggested answer
    Martin Dráb Profile Picture
    232,866 Most Valuable Professional on at
    RE: Trace (Log)

    As nlog, ETW can be configured to save data to various locations, therefore it depends...

    But by default, D365FO events are stored in event logs. In case of production environments, you can look at raw logs in LCS.

  • Guruprasanna Profile Picture
    1,054 on at
    RE: Trace (Log)

    Thanks martin,

    If we use EventSource, where we can see the work flow trace log ?

    Thanks in advance

    Guru

  • Verified answer
    Martin Dráb Profile Picture
    232,866 Most Valuable Professional on at
    RE: Trace (Log)

    I guess it is possible, but you're quite limited by the fact that you don't control production environments in cloud. You can't change configuration files, collect local trace files and things like that.

    Note that Microsoft uses EventSource classes to log events (e.g. in WorkflowTrace::Log()) and there already is a support for tracing in D365FO.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,099 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,866 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans