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.
class Chunked(BaseEntity): (source)
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 | get |
Describe field names, normalized types, defaults, and metadata. |
| Method | to |
Convert the dataclass instance to a recursively copied dictionary. |
| Class Variable | __slots__ |
Undocumented |
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: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. |