Announcements
No record found.
Hello,
Can anyone suggest the best practice to write trace (logs) for our code in X++. So in case of any issues we can collect that logs and find where the issue is.
I have gone through Trace functionality of D365 F&O. where we can analyze that trace file in trace parser to collect performance related information but I think we can not write our logs in that. right ? let me know if I am missing anything here.
Hi Pratik,
What exact issues are you expecting? What details you do want to store and where? Wouldn't be better to use the SysTest framework for automated testing? Or when you find an issue, you can use the debugger to find the root cause.
Standard logs are available in Event logs (on T1 environments) and in LCS (for other environments).
If you want you create additional logs, you might be interested using Azure Application Insights.
Hello Rami,
As you said, Trace Parser is being used for perfomance issues. You can not add or remove anything from Trace file that client generates.
If trace parser doesn't work for you, u can crate log table and specific fields in it and than insert records line by line while your customization code running like example below.(Insert type of log, type of business , execution timeStamp etc...).
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.
Congratulations to our 2026 Super Stars!
We are thrilled to have these Champions in our Community!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Giorgio Bonacorsi 616
André Arnaud de Cal... 460 Super User 2026 Season 1
Syed Haris Shah 331 Super User 2026 Season 1