简体   繁体   中英

Dynamics AX centralized logging

Our application consists of a web API that handles frontend app requests, some middleware that passes the request to Dynamics, and Dynamics AX in the backoffice that ultimately handles the request and generates a response.

Now we want to introduce some centralised logging (ELK, Seq), so that all layers log to some central place where we can view/search log entries. What options does Dynamics AX offer to write log statements to some central location?

If I understand your question correctly, you need something to log the end-to-end request/responses to and from AX.

The middleware could therefore be the best place to do the logging. It can log the requests sent to it, the subsequent request sent to AX, the response from AX, and the response that was finally sent back to the caller.

Assuming the middleware logging is easy enough to implement using any number of logging frameworks, the communication to AX services uses WCF, So take a look at enabling this in your application:

https://docs.microsoft.com/en-us/dotnet/framework/wcf/diagnostics/configuring-message-logging

Example here:

https://www.codeproject.com/Articles/383162/Logging-and-Tracing-WCF-Soap-Messages

This will give you the option to log all of the end-to-end communcation, to one logger.


AX also has it's own AIF logging, but this logs to it's own internal database:

https://docs.microsoft.com/en-us/dynamicsax-2012/appuser-itpro/monitoring-services-and-aif

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM