Log files and debugging

Logging can be enabled for the Four Js License Manager (FLM).

Requests and responses that are sent and received by the Four Js License Manager (FLM) may be recorded in log files. These logs are intended for the troubleshooting of licensing issues by decoding and reviewing events. You may be asked to activate logging in order to assist Four Js support with a licensing problem.

FLM logs

Enable and configure logging by setting log entries in the FLM configuration file ($FLMDIR/etc/flmprofile). You can enable logs for output to file, syslog (Unix-like and macOS™ platforms only), and console, or any combination of those options.

; Four Js License Manager configuration

# ...

[log]
enabled=true
# To use the file logger
directory="${FLMDIR}/log"

# Logged categories - values: error, info, warning, debug
# Debug category will produce an additional log file with .dlog extension.
categories="error,warning"

# Enable all log categories to troubleshoot licensing issues
# categories="all"

# To configure log rotation
maxfiles=5
maxsize="512M"

# To use the console logger
# console=true

# To use the syslog logger (Unix-like and macOS platforms only)
# syslog=true
# ...
where:
  • The enabled option enables logging.
  • The categories option specifies the type of events to record in the logs: error, warning, info, and debug. The debug category will produce an additional log file with the extension .dlog. The pseudo log category all enables all log categories. This category should only be used when you have a licensing issue that needs to be investigated further, as it will create the most amount of logs.
  • The directory option specifies the directory where logs are generated.
  • The maxsize option specifies the maximum log file size. Log files will be rotated automatically when the specified size is reached. The default value is -1 (no limit).
  • The maxfiles option specifies the number of log files to keep before rotating. The default value is -1 (no limit). For more information on log file rotation, see Log file rotation.
  • The console option allows you to redirect FLM logs to the standard output.
  • The syslog option allows you to redirect FLM logs to the system log on Unix-like and macOS platforms only.
    Warning:

    The syslog feature can not be enabled on Windows®.

You must restart the FLM after making any configuration change. After the restart, the logs appears in the logger option specified.

For more information on working with the FLM configuration file, see Configure the License Manager and Example: flmprofile.

Log filenames

The FLM tool generates two distinct log files in the specified directory:
  • flmprg.log is the log created by the flmprg command.
  • flmprgd.log is the FLM daemon log file. This file records details of events set in the categories configuration. This file is affected by the log configuration for file rotation specified by maxfiles and maxsize. For more information on log file rotation, see Log file rotation.

If logs are enabled and no directory provided, the output goes to stderr.

If you enable the debug category, additional files will appear with the extension .dlog. These may be requested by your Four Js support center if you encounter issues. The .dlog logs are encoded and are not intended to be readable by users.

Log file rotation

Log rotation is the cycling through of log files: starting a new log file when necessary, re-shuffling the remaining log files to keep them orderly, and removing older log files to free up space.

Configure automatic log rotation with the maxsize and maxfiles elements in the FLM configuration file ($FLMDIR/etc/flmprofile). When the current log file ( flmprgd.log) reaches the maxsize, the license controller closes the file and the FLM rotates, renames and renumbers the log files: flmprgd.log becomes flmprgd.1.log, flmprgd.1.log becomes flmprgd.2.log, and so on. It deletes the log file whose number exceeds the maxfiles value. It creates a new empty log file (flmprgd.log) after the current one is rotated.

Force a log rotation on demand with the --log-rotate option:
flmprg --log-rotate
This command forces a log rotation. It closes the current log file and starts a new log file, just as if the log rotation had been triggered by the maxsize value. You may wish to force a log rotation when you are asked to send a log file to Four Js, or move a log file to another location. This command and option can be executed at any time; even while log files are in use.