How-to search system logs for BYOD (and other) errors in D365 F&O

In this article I will show how to search the system logs for errors in the running of BYOD jobs. The obvious place to look for error messages is in the Job history of the BYOD job, but sometimes the message there is not detailed enough to understand what caused your job to fail.

Example

Here, I have a BYOD job containing 2 entities, one of which failed. In order to see the error message, I click on “Execution details” in the Job history and then “View execution log”:

Bring Your Own Database (BYOD) for Dynamics 365 Finance & Operations: Part 31

In the execution log, there are a few things to look for, the first obviously being the error message itself. However, the error message may be too generic or even non-existent.

Bring Your Own Database (BYOD) for Dynamics 365 Finance & Operations: Part 32

You will notice that the Staging status is ‘Ended’ meaning that the staging of the data to be imported in the BYOD job ran without issue, but the Target status is in ‘Error’. This means that the writing of the data into the destination caused the job to error out. The Log text for the Source (i.e. staging) is displayed and tells us that “’154316′ ‘Sales transactions’ record(s) inserted in staging”

Then, by selecting the Target, you can see the Log text for the staging part of the run does not give any details:

Bring Your Own Database (BYOD) for Dynamics 365 Finance & Operations: Part 33

So, what do we do now? It is apparent that the Job history does not give us enough details (in this case) to resolve the issue. And we simply cannot do nothing because the error will occur again in the next run of the BYOD job.

Let’s log on to the LCS and look through the raw log files. You may also hear this log referred to as the ‘telemetry log’.

How-to search system logs for BYOD (and other) errors

Log on to the LCS and select the implementation for your company:

Bring Your Own Database (BYOD) for Dynamics 365 Finance & Operations: Part 34

Click “Full details” for the environment in which the error occurred:

Bring Your Own Database (BYOD) for Dynamics 365 Finance & Operations: Part 35

Click on “Environment monitoring” in the bottom half of the screen:

Bring Your Own Database (BYOD) for Dynamics 365 Finance & Operations: Part 36

Next, click on “View raw logs”:

Bring Your Own Database (BYOD) for Dynamics 365 Finance & Operations: Part 37

Enter a Start date, an End date, and any Search terms (comma separated), then click “Search”:

Bring Your Own Database (BYOD) for Dynamics 365 Finance & Operations: Part 38

Note: In the drop down box for Query name, you will see a listing of events through which you can search:

Bring Your Own Database (BYOD) for Dynamics 365 Finance & Operations: Part 39

Note: If you click “Show options”, you will be able to select how many rows to bring back and make the search time non-UTC:

Bring Your Own Database (BYOD) for Dynamics 365 Finance & Operations: Part 310

After you click “Search”, you will see a message that the log files are being searched for your Search terms:

Bring Your Own Database (BYOD) for Dynamics 365 Finance & Operations: Part 311

Once the search results are returned, you will see a listing of activities with many columns of information. Scroll to the right until you see column titled LevelName. This column contains keywords such as Information and Error:

Bring Your Own Database (BYOD) for Dynamics 365 Finance & Operations: Part 312

Click on the column header LevelName (or alternatively, scroll downwards until you see “Error”): 

Bring Your Own Database (BYOD) for Dynamics 365 Finance & Operations: Part 315

Scroll to the right until you see the column titled exceptionMessage, which will contain the message associated with that error:

Bring Your Own Database (BYOD) for Dynamics 365 Finance & Operations: Part 313

You can copy & paste this message into another file/document to help you decipher its meaning and to determine steps to rectify the issue.

When finished, click the X in the top right corner to close this search.

Bring Your Own Database (BYOD) for Dynamics 365 Finance & Operations: Part 314

Congratulations, you have searched system logs of D365 F&O via LCS for BYOD (and other) errors.