Skip to end of metadata
Go to start of metadata


One of the most important troubleshooting tools of the Gateway Webpage is the Logs page. This console shows errors caused by Gateway events including things like Database or Device connections, Authentication profiles, Alarm Journals and Pipelines, and anything else that is Gateway scoped. You can find logs in the Status tab of the Gateway Webpage under Diagnostics > Logs.

The Gateway Logs also provide a wealth of information about the running state of the Gateway. To learn more, refer to the section on Troubleshooting the GatewayThe Logs page is where the Gateway Console is located that allows you to see a live flow of log events in the system.

On this page ...


AttributesDescription
LoggerName of the logger that describes the context of the message.
TimeTime of log.
MessageMessage for the log.
Filter

Search criteria to filter for specific tasks or events. Click the Calendar  icon to set a filter date and time range. Options are Last Month, Last Week, Last 24 Hours, or Custom. 

Min LevelDropdown menu with options: All, Trace, Debug, Info, Warn and Error.
Live ValuesToggle switch to turn live values on or off.


Changing Logging Levels

The logs can be filtered by using a search term or by date.

  1. To change logging levels, go to the Gateway's Status > Diagnostics > Logs page and click on the  Settings  icon.
  2. On the Log Configuration popup that will open, search for the logger name in the Filter box, and select the desired logging level from the dropdown to the right of the logger name

Downloading the Logs

Gateway logs can also be exported using the Download Logs  icon the right.

Printing to the Logs

You can print to Gateway logs by using the system.util.getLogger() function. Below is a simple example, you can look in the appendix for more options.

logger = system.util.getLogger("My Logger Name")
logger.warn("My Warning Message")

Mapped Diagnostic Context Keys

Mapped Diagnostic Context Keys (MDC Keys) allow you to specify a specific context, such as a particular project, and then set a logging level for it. This will set all loggers that pertain to the specified project to the logging level. This is useful to help diagnose an issue with a specific system within the Gateway. To use MDC Keys, click the Settings  icon on the Logs page and navigate to the Context tab. Here, you can choose specific Key-Value pairs that match a particular system. Selecting the Key text field will bring up a list of possible keys in your system. Once a Key has been selected, selecting the Value text field will bring up a list of possible values that relate to the selected Key.



Filter by Mapped Diagnostic Context Key

The Logs can also be filtered to show only logs that pertain to an MDC Key. This can be useful when altering the logging level of one or more MDC Keys. To set an MDC filter on the logs, simply click the Add Mapped Diagnostic Context Filter  icon on the Logs page to open a window where MDC Key filters can be set. The filter can be specified for all values in a Key by not specifying a Value.

Merging to Logs

Many of the other pages in the Status tab also contain a logger that will just show logs that are relevant for that particular section. These log views all contain a button on the right side called Merge to Logs. This button allows the current filter to be applied to the main logs page, allowing you to still see only the logs for that section but use all of the tools available.




  • No labels