Working with Exo Business API logs
If you are experiencing difficulties with the API, or are trying to develop a new application, then the API Logs can be very useful.
Finding the API logs
API logs are (by default) written into the install folder of Exo Business Services.
The default location is C:\Program Files (x86)\MYOB Exo Business Services\
You can query this location from the SERVICES list if you have completely lost the location by finding the Exo Business API services in the list.
Log file naming conventions
Log files are named either:
MYOB.ED.EXO.Cloud.API.ServiceHost.ERROR.log - this is a Local API service log. (If you are accessing the API via direct server connection such as http://ServerName:8888/ or http://localhost:8888/ )
MYOB.ED.EXO.Cloud.Provider.ServiceHost.ERROR.log - This is a Relay service log. (If you are accessing the API via the MYOB relay servers at https://exo.api.myob.com/ )
A file without a Date is the Current logging file. Files are renamed when a new message is first required to be logged, meaning that a file usually refers to the previous days transactions.
A file named MYOB.ED.EXO.Cloud.Provider.ServiceHost.ERROR_2021_01_15.00.log is typically the Log for the 14th of January 2021.
Changing the Logging level for the API
For API development work or when troubleshooting, it is often useful to have a higher level of logging than standard via the API. Fortunately changing the API logging level for Exo is easy.
Finding the API Configuration file.
For a Local (Available as a Localhost port number) API the file name is:
MYOB.ED.EXO.Cloud.API.ServiceHost.exe.config
For a Relayed (Available via https://exo.api.myob.com) API the file name is:
MYOB.ED.EXO.Cloud.Provider.ServiceHost.exe.config
Per the screenshot, the file type of these files is .exe.config, and they should be showing the type as XML Configuration File.
Editing the file
Use a Text Editor to open the appropriate file.
Search for the string "<logger " this will take you to the NLOG section of the config file:
You need to change the "file" Logger Level to what you need. You can see here I have "Debug" set
Full information on Logging levels is available by reading up on NLOG, for example at CodeProject.com - Introduction to NLOG or at the NLOG Documentaiton on Github.
For problem analysis, Support recommends using either DEBUG or TRACE levels. Just a general warning, both of these levels can be very verbose, and we've seen instances of e-commerce integrations generating up to a gigabyte of logging data per day when running at these levels. You may want to reduce the logging level after you have identified problem, or at least monitor ongoing space consumption (If you need detailed API logging for ongoing operations).
Clearing Old Log Files
It is common for Old Log files to not be deleted by the API Service, this is likely related to file/folder permissions. It is recommended that older logs be deleted routinely if this is the case.
Everything to do with API Configuration should be referred to either your IT Administrators or your Exo Business Implementation Partners, or your API Developer Partner. These pages are highly technical and intended for your Partner to work through.
You can also find more resources on the MYOB Exo Business Education Centre.