This blog contains posts from the AX support team highlighting interesting features or issues within AX.
Because of the modular aspect of AX for Retail, it can sometimes be a bit daunting to try and track down the log files when troubleshooting. Here is a recap of where to go looking.
Log messages for Retail POS are stored in the POSISLOG table in the POS database. The logging level is configured in the Headquarters (Dynamics AX client) in the Functionality Profile window: Retail Headquarters > Setup > POS > Functionality Profiles > Functions tab.
Keep in mind that a Functionality Profile is assigned at the store level. For day-to-day processing, you will likely use “Error” level. When debugging a particular issue, you can safely move this up to “Trace” which is where we will have you set it if we’re helping debug an issue. Remember to push down any changes with an N- or A- job.
To view the log, use your favorite SQL editor (probably SQL Server Management Studio) and execute this query against the POS database:
select top 1000 * from POSISLog order by ID desc
A couple of additional notes:
Retail Transaction Service can be a little tricky to debug.
First, since all Retail Transaction Service calls originate in the POS, you should start by looking at the POSISLOG table for messages. Additionally, because Retail Transaction Service uses the .Net Business Connector to call business logic in AX, you should also look use the Windows Event Viewer to view the Application Log on the Retail Transaction Service machine. X++ exceptions can usually be viewed there.
To set up logging on the service itself, you need to modify the Retail Transaction Service configuration file. Launch your favorite text editor in Admin mode and open RetailTransactionService.exe.config. On a 64-bit machine, this is located in C:\Program Files (x86)\Microsoft Dynamics AX\50\Retail Transaction Service by default.
Change the following line to the appropriate logging level (0 = None, 1 = Error, 2 = Debug, 3 = Trace). You will need to restart the service for it to take effect.
<add key="LogLevel" value="3" />
Retail Store Connect is not very chatty in its logging, so when troubleshooting, set this to Trace (3).
You cannot change the location of the resulting log file which will be located in the AppData folder for the service login. This user is defined in the in Control Panel > Administrative Tools > Services > Microsoft Dynamics AX for Retail Transaction Service. By default, the log file will be C:\Users\[user]\AppData\Local\Microsoft Dynamics AX\50\Retail Transaction Service\Logs\Retail Transaction Service.log.
Retail Store Connect is more straightforward to set up. Launch the Retail Store Connect Settings application and select service instance. Hitting “next” four times will bring you to the Server Debugging Properties form. Here you can set the Log Level by marking one or more of the checkboxes (Error, Main, Actions, Detail, Functions). We will usually have you set the level to 15 (all except Functions). Logging at the Functions level will flood the log file and isn’t very helpful.
A couple of notes:
Aside from the logging built in to Retail Store Connect, there are a couple other ways to monitor your service instances.
The Messaging database for Retail Store Connect usually gives a quick glance at the health of a particular instance. Here are two queries that I like to use:
select Servermsg, Status, * from outgoingmessages order by packageno desc select RemotePkg, Servermsg, * from incomingmessages order by packageno desc
select Servermsg, Status, * from outgoingmessages order by packageno desc
select RemotePkg, Servermsg, * from incomingmessages order by packageno desc
For long-term monitoring of your entire Retail Store Connect infrastructure, error messages for all instances can be viewed in the Headquarters by using the Retail Store Connect Messages window:
Refer to the '”Retail Store Connect Status” section of the Headquarters User’s Guide for information on configuring this feature.
If you look closely at the Retail Store Connect Settings window, you will notice that clicking on the “Client Controls” button brings up a form with more logging options:
The fields on this window are very similar to the general Retail Store Connect logging options. These settings are used to log messages when the Dynamics AX client (the scheduler) communicates with Retail Store Connect through the client controls. By default, these messages are logged to the same directory (and same files) as the general Retail Store Connect log messages, but you can override this location with the “Log Dir:” field.
Do you have any other tips for troubleshooting AX for Retail? Did I miss any in this article? If so, feel free to comment below.