Logging configuration

The Logging configuration defines logging settings for Infor Public Sector.

The root Logging node has these attributes:

AttributeDescription
Base PathRelative path to the directory where log files will be created if text file logging is enabled. The path is relative to the Infor Public Sector application directory. If you do not specify a base path, then log files are created in the Log directory by default.

To create log files in a different directory, you must add the directory manually. Infor Public Sector will not create the specified directory if it doesn't exist. You can also specify an absolute path.

Default ProviderProvider that the database appenders will use if not obtained from the user. Uses the first available provider if empty.
Log LevelIndicates which events will be logged. You can specify one of eight values. The log levels are listed in order, from highest to lowest:
  1. Success
  2. Info
  3. Warning
  4. UserWarning
  5. Error
  6. Fault
  7. UserError
  8. Debug

Each log level also logs events at all lower levels. For example, Success is the highest log level, so all events will be logged.

Note: Logging has a performance impact, so you should use the lowest log level possible in a production environment.
Logging DestinationIndicates where log entries will be created. You can specify one of these values:
  • None: No logging will occur.
  • TextFile: Logs are written to text files on the server.
  • Database: Logs are written to the SYSTEMLOG table in the database. You can use the Lookup System Logs page in Infor Public Sector to look up database logs.
  • All: Logs are written to both text files and the database.
Sanitize Log Messages If set to True, then absolute paths, such as directory paths and IP addresses, will be redacted in log entries. This makes logs more secure.

The Loggers node is a child of the Logging node. It has several logger nodes as children, each of which defines a logger for a specific type of logging. Each logger node can have these attributes:

AttributeDescription
Display NameDisplay name of the logger.
EnabledIndicates whether the logger is enabled.
IdIdentifier for the logger.
Log LevelLog level for this logger. Can be used to override the default log level that is specified on the root Logging node.
TypeAssembly qualified name for the type.

Each logger node can have up to four children: Appenders, Categories, Dependencies, and Filters.

Appenders

Each logger node has a child Appenders node. The Appenders node has one or more Appender nodes as children. There are several different types of appenders, each of which writes log entries to a different location. These appender types are supported:

  • APPENDER: Generic appender. Use the Type attribute to specify the type of appender.
  • CONSOLEAPPENDER: Writes log entries to the console.
  • DATABASEAPPENDER: A database appender writes log entries to the SYSTEMLOG table in the database.
  • EVENTLOGAPPENDER: Writes log entries to the Windows Event Log.
  • FILEAPPENDER: A rolling file appender writes log entries to a specified file on the server.

The attributes of an appender node depend on the type of appender that you select. A generic appender can have these attributes:

Attribute Description
Enabled Indicates whether the appender is enabled.
Id Identifier for the appender.
Log Level Log level for this appender. If this is set to a higher log level than the parent logger, it will override the parent log level. Otherwise it is ignored.
Type Assembly qualified name for the type of appender.

A console appender can have these attributes:

Attribute Description
Console Color Text color to use for console logging.
Enabled Indicates whether the appender is enabled.
Id Identifier for the appender.
Log Level Log level for this appender. If this is set to a higher log level than the parent logger, it will override the parent log level. Otherwise it is ignored.

A database appender can have these attributes:

Attribute Description
Enabled Indicates whether the appender is enabled.
Id Identifier for the appender.
Log Level Log level for this appender. If this is set to a higher log level than the parent logger, it will override the parent log level. Otherwise it is ignored.

An event log appender can have these attributes:

Attribute Description
Enabled Indicates whether the appender is enabled.
Id Identifier for the appender.
Log Level Log level for this appender. If this is set to a higher log level than the parent logger, it will override the parent log level. Otherwise it is ignored.

A rolling file appender can have these attributes:

Attribute Description
Enabled Indicates whether the appender is enabled.
File Name File name to use for text file logging. If this is a full path, then it will be override the base path set on the Logging node.
Id Identifier for the appender.
Log Level Log level for this appender. If this is set to a higher log level than the parent logger, it will override the parent log level. Otherwise it is ignored.

Each appender node can have three children: Dependencies, Filters, and Layout.

Dependencies

The Dependencies node can be a child of a logger node, an appender node, a filter node, a dependency node, or a Layout node. Dependencies can be nested to any depth.

Each Dependencies node has one or more dependency nodes as children. Each dependency node can have these attributes:

Attribute Description
Dependency Type Type of dependency. Can be Constructor or Property.
Id Identifier for the dependency.
Type Assembly qualified name for the type of dependency.
Value Value of the dependency if the dependency is a primitive type.

Categories

Each logger node can have a child Categories node. Categories provide away to group or segment appenders. The Categories node has one or more Category nodes as children. Each Category node has these attributes:

Attribute Description
Appenders Comma-separated list of appenders that belong to the category.
Id Identifier for the category.

Filters

The Filters node can be a child of a logger node or an appender node. It has one or more filter nodes as children. If an appender has no filters, then logging for that appender is controlled by the Enabled attribute of the Appender node.

If an appender does have one or more filters, then logging also depends on the filter types and the value of the Logging Destination attribute on the root Logging node. For example, if a database appender has a database filter, then log entries will only be written to the database if the Logging Destination attribute is set to Database or All.

Each filter node can have these attributes:

Attribute Description
Enabled Indicates whether the filter is enabled.
Id Identifier for the filter.
Type Assembly qualified name for the type.

Layout

Each appender node can have a child Layout node, which defines how log entries are formatted. The Layout node has one attribute:

Attribute Description
Type Assembly qualified name for the type of layout.