Skip to content

Log

The log control settings are detailed below.

Variable Quick Description
HSM_LOG_LEVEL Level of information recorded in the log (1000: no log, 0: error, 3: debugging).
HSM_LOG_DIR Log directory path.

Level

Environment variable to be defined: HSM_LOG_LEVEL

Value Log Level
1000 Disabled: no event is logged.
0 Errors only: only records error situations (they usually prevent the requested service from running).
3 Debugging: records detailed operating information, as well as error, warning and information messages.

The value is the desired type and detail of the events in the log file. Under normal operating conditions, it is recommended to keep the library log to a minimum. More detailed event logs can be used to diagnose operating problems.

Directory

Environment variable to be defined: HSM_LOG_DIR

Value Log directory path
Not defined It does not generate logs.
dir path Full path of the log directory.
stdout Directs log messages from to standard output stdout and the error messages for stderr. Use the literal stdout. Generally used in environments based on container.

The library tries to create the log files in the indicated path, if it can't (lack of space, lack of permission, etc.) it will continue executing the operations normally.

When this environment variable is set, logs are generated by default with the debugging log level and with direct writing to the file (no caching). To change the logging level, set the environment variable HSM_LOG_LEVEL.

Formation of the name of the generated log files

Log files are generated by the process that loads the library(ies), using the Process ID (PID) to differentiate the log files generated. The formation of the log file name obeys the following formation law:

tacnd<library>_<PID>.log

Where <library> can be: - lib (native library) - csp (MS CAPI/CNG integration library) - p11 (integration library PKCS#11) - jca (Java integration library)

Example:

tacndlib_34565.log
tacndlib_42892.log

tacndcsp_24329.log
tacndcsp_17643.log