Variables
custom_logger: logging.Logger: A custom logger instance for the Systematica library.
build_logger
| Name | Type | Default | Description |
|---|---|---|---|
logger_name | str | -- | The name of the logger to create. |
| Type | Description |
|---|---|
logging.Logger | A configured logger instance with a RichHandler. |
UTCFormatter
%, { or $ to specify that you want to
use one of %-formatting, str.format ({}) formatting or
string.Template formatting in your format string.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
fmt | str | None | The format string for the log messages. If None, a default format is used. |
datefmt | str | None | A format string for the date and time in the log messages. If None, defaults to ISO format. |
style | str | % | The style of formatting to use. Can be one of %, {, or $. Defaults to %. |
validate | bool | True | If True, validate the format string against the specified style. |
defaults | dict | None | A dictionary of default values for the format string. This is used to provide default values for any placeholders in the format string. |
| Type | Description |
|---|---|
ValueError | If the format string is invalid for the specified style. |
Ancestors
logging.Formatter
Methods
formatTime
| Name | Type | Default | Description |
|---|---|---|---|
record | logging.LogRecord | -- | The log record containing the timestamp to format. |
datefmt | str | None | A format string for the datetime. If not provided, defaults to ISO format. |
| Type | Description |
|---|---|
str | The formatted timestamp as a string. |
Logger
| Name | Type | Default | Description |
|---|---|---|---|
strategy_name | str | None | The name of the strategy for which the logger is created. If not provided, the default root logger is used. |
Descendants
systematica.portfolio.messengers.base.BaseMessengersystematica.utils.logger.TimeRotatingLogger
Static methods
get_logger_instance
| Name | Type | Default | Description |
|---|---|---|---|
strategy_name | str | -- | The name of the strategy for which the logger is created. |
| Type | Description |
|---|---|
logging.Logger | A logger instance configured for the specified strategy. |
Methods
info
INFO level.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
msg | str | -- | The message to log. |
error
ERROR level.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
msg | str | -- | The message to log. |
warning
WARNING level.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
msg | str | -- | The message to log. |
TimeRotatingLogger
| Name | Type | Default | Description |
|---|---|---|---|
strategy_name | str | None | The name of the strategy for which the logger is created. If not provided, the default root logger is used. |
Ancestors
systematica.utils.logger.Logger
Static methods
get_logger_instance
TimedRotatingFileHandler that rotates at midnight.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
strategy_name | str | -- | The name of the strategy for which the logger is created. |
| Type | Description |
|---|---|
logging.Logger | A logger instance configured for the specified strategy. |

