Adapter Log Configurations¶
The log configurations file for the Adapter is located in these directories based on your Choreo Connect deployment method.
The sample for Adapter log configurations looks similar to the following.
# The logging configuration for Adapter
## Adapter root Level configurations
logfile = "logs/adapter.log"
logLevel = "INFO"
LogFormat = "TEXT"
[rotation]
MaxSize = 10 # In MegaBytes (MB)
MaxBackups = 3
MaxAge = 2 # In days
Compress = true
## Adapter package Level configurations
[[pkg]]
name = "github.com/wso2/product-microgateway/adapter/internal/adapter"
logLevel = "INFO"
[[pkg]]
name = "github.com/wso2/product-microgateway/adapter/internal/oasparser"
logLevel = "INFO"
Adapter root Level configurations¶
Property | Description |
---|---|
logfile |
The file, which will be created inside the container for writting logs. |
logLevel |
Upto which level the logs should be printed. If this is set under root level, it will be applied through all packages unless specified in package log levels. LogLevels can be "DEBG" , "FATL" , "ERRO" , "WARN" , "INFO" , "PANC" |
LogFormat |
Format of the logs printed. Log formats can be Note
|
[rotation].MaxSize |
MaxSize is the maximum size in megabytes of the log file before it gets rotated. It defaults to 10 megabytes. |
[rotation].MaxAge |
MaxAge is the maximum number of days to retain old log files based on the timestamp encoded in their filename. Note that a day is defined as 24 hours and may not exactly correspond to calendar days due to daylight savings, leap seconds, etc. The default is set as 2 days. |
[rotation].MaxBackups |
MaxBackups is the maximum number of old log files to retain. The default is to retain 3 old log files (though MaxAge may still cause them to get deleted). |
[rotation].Compress |
Compress determines if the rotated log files should be compressed using gzip. The default is not to perform compression. |
Adapter package level configurations¶
Adapter package level configurations can override the root level configurations for the purpose of applying logging rules at package level. Note that LogFormat
will not be supported at package level.