Logging¶
get_logger ¶
Return the AutoTuneNet logger.
Importing AutoTuneNet has no side effects: nothing is written to disk unless file logging is enabled, either with enable_file_logging() or by setting the AUTOTUNENET_LOG_FILE environment variable to a file path. Messages go to the console once (the logger does not propagate to the root logger, so they are not printed twice).
Source code in src/autotunenet/logging/logger.py
enable_file_logging ¶
Also write logs to a file and return its path.
Calling it again with the same path does not add a second handler.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str | None
|
Log file path. Defaults to |
None
|
name
|
str
|
Logger name. |
LOGGER_NAME
|
Returns:
| Type | Description |
|---|---|
str
|
The path written to. |