Gateway Loggers
When troubleshooting Gateway-scoped issues, you can use Gateway loggers to find more details about the problem. To view your Gateway logs, navigate to the Diagnostics > Logs page.
On this page, you can click the Settings icon on the right side of the page. This will bring up the Log Configuration window. Here, you can enter in one of the loggers that is listed on the Logs page into the filter, and then change its logging level. The DEBUG and TRACE logging levels will cause that specific logger to report more detailed logs to the Logs page, allowing you to better diagnose the issue. If you set a parent logger to a specific level, it will also set all children of that logger to the same level.
MDC Keys​
MDC Keys allow you to quickly set logging levels for all loggers that are related to a specific part of your Gateway. So instead of setting individual loggers to DEBUG, you can use MDC Keys to set a group of loggers to DEBUG all at once.
To use MDC Keys, navigate to the Diagnostics > Logs page on the Gateway. Click on the Settings icon to bring up the Log Configuration panel, then click on the Context tab. This is where all existing MDC Keys will be displayed. To add an MDC Key, click on Add Level +.
When creating a key, there are a few fields where you can select information. The first field is the Key field, where you can select the appropriate MDC Key. The field will list out available Keys, making it easier to find what you are looking for.
For the Value field, you can choose a value for the selected MDC Key. This field will list values for you to choose from. In the image below, by selecting the database Key, the Value field lists out all of the available database connection names.
Finally, you can set the appropriate logging level in the Set Level field, typically either DEBUG or TRACE, and then click Add Level.
You can add as many of these as you would like, even with the same Key. In our example, we can first add our database called MSSQL. Then, using the database Key again, add in the database called MySQL. This allows you to quickly set the appropriate loggers to find out more information about the system you are trying to troubleshoot.