THE ORIONIS API
Build with clarity.
Explore the building blocks of an async-first Python framework. Every module, class, and method — connected, searchable, and ready to build with.
Configure chunked log file rotation.
This class defines the configuration for managing log files by splitting them into chunks based on file size and limiting the number of retained log files. This prevents log files from growing indefinitely and helps manage disk usage.
| Method | __post |
Validate and normalize configuration fields after initialization. |
| Instance Variable | files |
Maximum number of log files to retain. Older files are deleted when this limit is exceeded. |
| Instance Variable | level |
Logging level for the log file. Accepts an integer, string, or Level enum. |
| Instance Variable | mb |
Maximum size (in megabytes) of a single log file before a new chunk is created. |
| Instance Variable | path |
Filesystem path where chunked log files are stored. |
Inherited from BaseEntity:
| Class Method | _cached |
Retrieve field definitions and normalized types cached by class. |
| Method | __init__ |
Initialize declared fields and public extra attributes. |
| Method | _dynamic |
Return public instance attributes that are not declared fields. |
| Method | _validate |
Validate names and storage for public extra attributes. |
| Method | get |
Describe declared fields and, optionally, dynamic attributes. |
| Method | to |
Return a recursively copied dictionary of declared and extra values. |
| Class Variable | __slots__ |
Declare that this class introduces no additional instance slots. |
| Class Variable | _orionis |
Cache declared fields and normalized type names for each concrete class. |
Validate and normalize configuration fields after initialization.
Validates the following: - path: Ensures the path is valid using IsValidPath. - level: Ensures the log level is valid using IsValidLevel. - mb_size: Checks that it is an integer between 1 and 1000 (MB). - files: Checks that it is a positive integer greater than 0.
| Parameters | |
self:orionis.foundation.config.logging.Chunked | The instance of the Chunked configuration. |
| Returns | |
None | This method does not return a value. |
| Raises | |
ValueError | If any configuration value is invalid. |
TypeError | If any configuration value has an incorrect type. |