Logging

The collaboration server uses logging for different purposes. All log files are written to the logging output directory (see com.unblu.logging.outputDirectory). The main log file is a general purpose log file that is mostly used for status messages, warnings, errors and debug output (if enabled). The fatal log file only contains fatal errors (if any). And the session log is a structured log file that logs information about all collaboration sessions that have taken place.

Log Files

unblu writes tree log files. The sections below describe the purpose and contents of each of them.

Main Log File

The main log file is a general purpose log file. All status messages, errors, warnings and debug messages are written to the main log file. By default the main log file is named unblu.<date>.log.

Session Log File

WARNING: The session log file is deprecated and will not be supported in future versions. Use session Statistics instead. Statistics are also accessible via the Web API.

The session log is a structured log file that holds information about all collaboration sessions that have taken place in a JSON based format. By default, the session log file is named unblu-session..log.

For more details about the session log format read Session Log Format.

Fatal Log File

The fatal log is an extract of the general purpose log and only contains fatal errors. If anything is written to the fatal log, this means that the collaboration server will most probably not work correctly. By default the fatal log file is named unblu-fatal.<date>.log.

Log File Rotation

All log files are rotated on a daily basis. This means that in the logging output directory for every log type (main, session, fatal) you will get a file for each day.

By default, unblu cleans out old log files for the main and the fatal log files after seven days. Session logs are not deleted automatically.

Log File Format

The main and the fatal log use the following format per default.

format:  DATE (ISO_8601)          [         THREAD NAME] [  CONTEXT INFO] LEVEL (              LOGGER_NAME:LINE) MESSAGE
example: 2017-05-23T13:30:01.346Z [                main] [u: s: c: p: r:] INFO  (RuntimeProductResolver.java:85) Hello

The CONTEXT INFO section holds the following (optional) information:

  • User (u: <userid>)
  • Session (s: <sessionId>) (Web Session identified by the x-unblu-session cookie.
  • Page (p: <pageId>) (Page impression in a browser client)
  • Request (r: <requestId>) (Typically a HTTP request)

All information in the CONTEXT INFO section is optional and only available if the log output was generated in a context that has the corresponding information associated.

The information in the CONTEXT INFO section can be used for filtering or associating log entries. Using the sessionId it is also possible to associate log output to a Collaboration Session in Statistics or in the session log.

Configuration

The logging system can be configured using configuration settings. (See Configuration).

Output Directory

The most important configuration setting regarding logging is com.unblu.logging.outputDirectory, it specifies the file system directory logfiles are written to. If no output directory is configured, unblu will write log messages to standard output.

We recommend always setting a logging output directory when installing the collaboration server.

Enabling / Disabling Fatal or Session Log

The fatal log can be disabled / enabled using com.unblu.logging.fatalLogEnabled.

The session log can be disabled / enabled using com.unblu.logging.sessionLogEnabled.

Log File Retention Time

You can use the following configuration settings to define how many days the log files should be kept:

Log Levels

unblu logging supports different log levels (ERROR, WARN, INFO and DEBUG). By default the log level for unblu is set to INFO and the log level for integrated third-party libraries is set to WARN.

The root level for unblu can be changed using com.unblu.logging.rootLevel.

The root level for third-party libraries can be changed using com.unblu.logging.rootLevelThirdparty.

Log levels for individual loggers (packages or classes can be set using the following notation).

com.unblu.logging.level.<loggerName>=<level>

If, for instance, the level of the filter (logger name = "com.unblu.review.server.filter"is to be set to DEBUG, the following configuration setting is required:

com.unblu.logging.level.com.unblu.review.server.filter=DEBUG.

Advanced Configuration

All logging-related configuration settings can be found here LoggingConfiguration.

  • deployonprem

results matching ""

    No results matching ""