Application Logging and the logging.destination and logging.verbosity System PropertiesIssue <!-- div.margin{ padding: 10px 40px 40px 30px; } table.tocTable{ border: 1px solid; border-color:#E0E0E0; background-color: rgb(245, 245, 245); padding-top: .6em; padding-bottom: .6em; padding-left: .9em; padding-right: .6em; } table.noteTable{ border:1px solid; border-color:#E0E0E0; background-color: rgb(245, 245, 245); width: 100%; border-spacing:2; } table.internaltable { white-space:nowrap; text-align:left; border-width: 1px; border-collapse: collapse; font-size:14px; width: 85%; } table.internaltable th { border-width: 1px; padding: 5px; border-style: solid; border-color: rgb(245, 245, 245); background-color: rgb(245, 245, 245); } table.internaltable td { border-width: 1px; padding: 5px; border-style: solid; border-color: #E0E0E0; color: #000000; } table tr td { padding: 15px; } .title { color: #D1232B; font-weight:normal; font-size:28px; } h1{ color: #D1232B; font-weight:normal; font-size:21px; margin-bottom:-5px } h2{ color: #646464; font-weight:bold; font-size:18px; } h3{ color: #000000; font-weight:BOLD; font-size:16px; text-decoration:underline; } h4{ color: #646464; font-weight:BOLD; font-size:15px; text-decoration:; } h5{ color: #000000; font-weight:BOLD; font-size:13px; text-decoration:; } h6{ color: #000000; font-weight:BOLD; font-size:14px; text-decoration:; } hr{ border-top-width: 1px; border-top-style: solid; border-top-color: #cccccc; } ul { list-style: disc outside none; margin-left: 0; } li { padding-left: 1em; } --> Although the default setting in a ServiceNow instance is generally to log most messages for a scoped application to the syslog table and localhost files, there are a few properties that can be used to configure and adjust how and where this logging occurs. These are the logging.destination and the logging.verbosity properties. Specifying and adjusting these properties allow the ServiceNow administrator to determine specifically what level of messages are logged and where those messages will be logged. These properties are not created by default when a new Scoped Application is created. However, they can easily be created directly on the instance or through the Studio application. If creating the property directly from the application, ensure to first set your current scope to be that for which you want to configure this property. The property should have a prefix consisting of the scope name of the scoped application (i.e. x_sn_newapp) to which it should be applied to. This prefix then scopes the property to a specific scoped application found on the instance. Several of the out-of-box and ServiceNow Store applications may contain this system property as specified for that application, however, by default, most do not. ResolutionThe "logging.destination" System Property The first system property we will examine is the logging.destination property. This property determines the target of logging messages for the scoped application. There are two possible values that can be used for this property: file - Specifying the value as FILE indicates that logging messages for this scoped application should only be sent to the localhost file. Thus, the messages will appear in the localhost logs but not the syslog table on the instance.db - Specifying db in the Value field for this property indicates that the log messages for the scoped application should be written to both the localhost logs and the syslog table. When creating this property for a scoped application, the following fields in the System Property record should be filled out as indicated: Suffix: logging.destination(This holds the property name that is to be configured for the scoped application) Name: This will automatically populate after suffix is filled out (scope_name.logging.destination)Example" If the scoped app name is x_sn_newapp, then it would be x_sn_newapp.logging.destination. Application: The will auto populate with the name of the scoped app. Description: This is an optional field which is used to hold the purpose and usage of this system property. Choices: db, file(This field should hold the options which can be selected for the property with a comma in between each allowable setting for the property) Type: choice list (as selected from the pull down menu) Value: This should be one of the strings (db, file) as described above. The Ignore Cache and Private checkboxes should both be selected for this system property. Once created (or updated) the setting for the property should then determine the destination of the log file writes for new user logins. Lacking this property, the default value of db is assumed and thus, if the property is not specified the logging messages for the scoped application is recorded in the log file itself as well as in the syslog table on the instance. The "logging.verbosity" System Property The Scoped Logging API provides four levels of verbosity. In order from least verbose to most, they are: Log Level Description error (gs.error) Logs events that might still allow the application to continue running. Setting the log level for an application to error generates error messages only, but does not generate warn, info, or debug messages. warn (gs.warn) Logs potentially harmful events. Setting the log level for an application to warn generates error and warn messages, but does not generate error or debug messages. info (gs.info) Logs informational messages that describe the progress of the application. Setting the log level for an application to info generates info, warn, and error messages, but does not generate debug messages. debug (gs.debug) Logs informational events that are useful for debugging an application. Setting the log level for an application to debug generates info, warn, error, and debug messages. When creating this property for a scoped application, the following fields in the System Property record should also be filled out as indicated: Suffix: logging.verbosity(This holds the property name that is to be configured for the scoped application) Name: This will automatically populate after suffix is filled out (scope_name.logging.verbosity)Example" If the scoped app name is x_sn_newapp, then it would be x_sn_newapp.logging.verbosity. Application: The will auto populate with the name of the scoped app. Description: This is an optional field which is used to hold the purpose and usage of this system property. Choices: debug,info,warn,error(This field should hold the options which can be selected for the property with a comma in between each allowable setting for the property) Type: choice list (as selected from the pull down menu) Value: This should be one of the strings (error, warn, info, or debug) as described above. The Ignore Cache and Private checkboxes should both be selected for this system property. The change to the logging level for the selected scoped application should then be reflected in the system logs for new user logins. If this property is not specified or the Value field is blank for the property, the default value of info will be assumed by the system, thus resulting in the recording of information, error and warning level messages to the logs. Related LinksOther Concerns A previous note on this article indicated these properties could be used in the "Global" scope. Please note this property will only work as created for specific application scopes. An issue which is sometimes encountered or reported is that error messages for a specific application or for the system in general are not being recorded as expected. In this event, these settings should be checked, as the cause of the issue will often be the current setting for these properties for a specific application scope.