Define logging rules

Logging rules are defined separately for each part of the Alfabet functionality for which logging is provided. You can define different log levels for each functionality and different log targets. For each logging rule, you can define either one or multiple log targets, depending on your log infrastructure.

Define a default log level.

NLog uses a hierarchy of log levels. The levels are:

Position Log level Description
0 Trace Most verbose level. Usually only activated for development.
1 Debug Debugging level including internal event logging.
2 Info Information level logging progress or application lifetime events.
3 Warn Warnings about validation issues or temporary failures are logged.
4 Error Errors where functionality has failed and exceptions are logged.
5 Fatal Most critical level. Log messages are only created when the application is about to abort.
6 Off No logging is done.

You can define which levels of log messages shall be used in the logging rules. NLog provides different methods for definition of log levels. In the Alfabet NLog example configuration files, specification of a minimum log level is used. If you specify, for example, a minimum log level of Error , only log levels with position 4 and higher in the hierarchy are written to the log file. You will see only Error and Fatal log messages. To ease change of the general log level, the Alfabet NLog example configuration files use a variable for the definition of the minimum log level:

In the rules, the minimum log level specification is specified via the variable:

To change the log level for all rules, you can change the value of the variable to the new log level and it will be automatically applied to all rules. If you want to change the log level for a single rule, you can delete the variable definition from the rule and overwrite it with the text specification of the log level.

Define logging rules.

Specify log details in the <rules> section of the NLog configuration file. Each functionality has a separate XML element <logger> with the following XML attributes:

The following information is limited to a description of the pre-configured example file. To see all options for configuring rules, consult the NLog documentation about rules definition.

For some of the loggers, filters are defined:

If you want to change the filters or create own filters, consult the NLog documentation for details about filter syntax.

The following loggers are available for Alfabet functionality.

name attribute value of the XML element logger logged functionality
alfabetlogger.System
  • Basic functionalities of the Alfabet component.
  • Information about the execution of jobs scheduled in the Job Schedule functionality. Messages about normal execution are written with the Info log level.
  • Information about JSON responses for ADIF sessions executed in the scope of the ARIS - Alfabet Interoperability Interface. These messages have the Debug log level.
alfabetlogger.UserLogon
  • User log in and log out to an Alfabet components. The user name and the information whether login or logout was successful will be logged. The log level must be Debug to log all user log in and log out activities. Otherwise, only errors will be logged.

    If the Server Settings > General > Update History User Name attribute of the server alias is set to TECH_NAME , the Technical Name defined for the user will be logged instead of the user's name. It is essential to define the Technical Name attribute for all users if this setting is used.

  • Shutdown of the Alfabet Web Application and the reason for shutdown.
  • If user authentication and authorization is done via synchronization with an external LDAP server, each LDAP authentication, LDAP authorization and search for a user in LDAP is also logged. The respective messages all start with LDAP
  • The registration in the Windows® event log, if the XML attribute writeTo is set to windowsLog.
alfabetlogger.Workflow Activity of the Alfabet workflow functionality.
alfabetlogger.ADIF ADIF execution. Commit actions are logged with the Info log level and rollback actions are logged with the Warn log level. Execution via the Job schedule functionality is logged with the Debug log level.
alfabetlogger.Report Execution of configured reports.
alfabetlogger.Publication Execution of publications.
alfabetlogger.Database Requests to the Alfabet database.
alfabetlogger.REST Execution of the Alfabet RESTful services.

It is recommended to activate central logging of REST functionalities because the return values for the RESTful services do not cover all error details for security reasons. For example if the Alfabet Server is required to execute an ADIF job that shall be executed via a RESTful service call, the RESTful services will inform about forbidden access only and the information about the component that could not be accessed is only provided via central logging.

alfabetlogger.SSO Activity related to a configured SAML authentication. This setting is only relevant if the Alfabet Web Application is configured to use SAML for user authentication.
alfabetlogger.Event Execution of events configured via the Event Management functionality.

Log messages for event execution are also written to the ALFA_EVENT_BUS table in the Alfabet database.

alfabetlogger.Conditions Execution of conditions. Conditions are defined in Alfabet Expand to hinge visibility of elements of the Alfabet user interface on the availability of defined preconditions.
alfabetlogger.License The Alfabet license manager functionality.
alfabetlogger.MonitoringEvents Monitoring of database availability. This option must be activated to test the database availability via the mechanism described in the section ATO: Checking the Accessibility of the Database below.
alfabetlogger.WebApplication Web based functions of the Alfabet Web Application.

Activation of this logger considerably increases the amount of log messages. This logger should only be activated if the cause of issues cannot be detected via the logging provided by the other log options.

alfabetlogger.ResetPassword Reset of user passwords for Alfabet managed users.
alfabetlogger.Email Sending of emails by the Alfabet server.
alfabetlogger.Performance Performance related parameter logging. This logger shall be active if performance issues occur to send the resulting log to Alfabet Support.
* Startup processes.