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):
; Four Js License Manager configuration

# ...

[log]
enabled=true
directory="${FLMDIR}/log"
categories="error,warning,info" # debug
maxfiles=5
maxsize="512M"
# ...
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 directory option specifies the directory where logs are stored.
  • 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.

You must restart the FLM after making any configuration change. After the restart, the log file appears in the directory 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.