Adapter logging
getLogger(name)
¶
A convenience function to get a logger with a specific name.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
str
|
The name of the logger. |
required |
Returns:
Type | Description |
---|---|
Logger
|
logging.Logger: The requested logger. |
Source code in lib/python/src/aria/ops/adapter_logging.py
rotate()
¶
Rotates the current adapter logs to their backups (e.g., adapter.log
to
adapter.log.1
) and starts logging to the new adapter.log file.
setup_logging(filename, file_count=5, max_size=0)
¶
Sets up logging using the given parameters.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
filename |
str
|
The name of the file to log to. |
required |
file_count |
int
|
The total number of files to retain. Defaults to 5. |
5
|
max_size |
int
|
The maximum size in bytes of each file before the file automatically rotates to a new one. Defaults to '0', which will do no automatic rotation. Requires calling the 'rotate()' function manually to ensure logs do not become too large. |
0
|