Logging Parameters
This section explains the logging parameters:
Note
You must have the permission to write to the log file and to create new files in the directory where the log files are created.
CAPI
The following table lists the logging parameters for CAPI.
Parameter | Default | Description |
---|---|---|
Log_Level | WARN | Level of logging performed by the client. Values are not case-sensitive. Possible settings: • NONE - Disables client logging. It is recommended that you do not disable logging. • ERROR - Logs the error messages only. For example, if you want that only error messages are logged, set Log_Level=ERROR .• WARN - Logs the error messages and warnings. • INFO - Logs the error messages, warnings, and informational messages. This level generates a very large number of entries and is usually reserved for debugging. For example, if you want that error messages, warnings, and informational messages are logged, set Log_Level=INFO .• DEBUG - Logs the diagnostic information. Note: To run your client application, you must have permission to write to the log file and to create new files in the directory where the log files are created. |
Log_Rotation | Daily | Determines how frequently the log file is rotated. Possible settings: • Daily- Rotates the log file daily. • Size - Rotates logs when the log file reaches the size specified in Log_Size_Limit . For example, if you want logs to be rotated once they reach the size specified in Log_Size_Limit, set Log_Rotation=Size . |
Log_Size_Limit | 100k | Specifies how large the log files can be before they are rotated. This parameter is used only when Log_Rotation is set to Size.Possible settings: • Any positive integer - The default unit is bytes. You can use the suffix k (or K) for kilobytes and m (or M) for megabytes. For example, if you want the logs to be rotated once they reach 1 MB, set Log_Size_Limit=1M (or 1024k or, 1048576) . |
Log_File | Logfile.txt | Name and path to the log file. Possible settings: •The filename - The log is created in the same directory as the client. The default value is Logfile.txt .•The path and filename - The path need to be absolute. Do not use quotes, even if the path contains spaces. |
If Log_File
is set as stdout
, the logs are dumped to stdout
(standard output) and errors are dumped to stderr
(standard error).
PKCS #11
The following table lists the logging parameters for PKCS #11.
Parameter | Default | Description |
---|---|---|
Log_Level | WARN | Level of logging performed by the client. Values are not case-sensitive. Possible settings: • NONE - Disables client logging. It is recommended that you do not disable logging. • ERROR - Logs the error messages only. For example, if you want that only error messages are logged, set Log_Level=ERROR .• WARN - Logs the error messages and warnings. • INFO - Logs the error messages, warnings, and informational messages. This level generates a very large number of entries and is usually reserved for debugging. For example, if you want that error messages, warnings, and informational messages are logged, set Log_Level=INFO .• DEBUG - Logs the diagnostic information. Note: To run your client application, you must have permission to write to the log file and to create new files in the directory where the log files are created. |
Log_Rotation | Daily | Determines how frequently the log file is rotated. Possible settings: • Daily- Rotates the log file daily. • Size - Rotates logs when the log file reaches the size specified in Log_Size_Limit . For example, if you want logs to be rotated once they reach the size specified in Log_Size_Limit, set Log_Rotation=Size . |
Log_Size_Limit | 100k | Specifies how large the log files can be before they are rotated. This parameter is used only when Log_Rotation is set to Size.Possible settings: • Any positive integer - The default unit is bytes. You can use the suffix k (or K) for kilobytes and m (or M) for megabytes. For example, if you want the logs to be rotated once they reach 1 MB, set Log_Size_Limit=1M (or 1024k or, 1048576) . |
Log_File | Logfile.txt | Name and path to the log file. Possible settings: •The filename - The log is created in the same directory as the client. The default value is Logfile.txt .•The path and filename - The path need to be absolute. Do not use quotes, even if the path contains spaces. |
Configuring Logs for Java Wrapper
A log file will be created for the wrapper application in the same directory by default where the application is deployed.
To modify the log file path:
Create log4j2 properties file and add the property as
property.filename
with the absolute path to the log file.Place this property file in any directory and specify it in classpath while running the application.
property.filename=<absolute_path_to_log_file>
Caution
This will override default log4j2 properties.