Announcements
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
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).
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.
Thank you
Guru
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.
Thanks martin,
If we use EventSource, where we can see the work flow trace log ?
Thanks in advance
Guru
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.
André Arnaud de Cal...
294,099
Super User 2025 Season 1
Martin Dráb
232,866
Most Valuable Professional
nmaenpaa
101,158
Moderator