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. |
HSM_LOG_FLUSH |
Log buffering control. |
Level
Environment variable to be set: 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 set: 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 to the standard output stdout and error messages to stderr. Use the literal stdout . Generally used in container-based environments. |
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
.
Log Flush
Environment variable to be set: HSM_LOG_FLUSH
Enables log messages to be written directly to the log file, without using a buffer.
Value | Buffeting status |
---|---|
Not defined (or 0) | Log messages are buffered and written to the log file at intervals. |
1 | Log messages are immediately written to the file. |
The library can keep a small buffer of log messages before making the physical recording in the file, which allows for performance gains. In error conditions or diagnostic situations, it is interesting that the log is written immediately after the occurrence.
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
Onde <library>
pode ser:
- lib
(biblioteca nativa)
- csp
(biblioteca de integração MS CAPI/CNG)
- p11
(biblioteca de integração PKCS#11)
- jca
(biblioteca de integração Java)
Example:
tacndlib_34565.log
tacndlib_42892.log
tacndcsp_24329.log
tacndcsp_17643.log