Module structlog.sinks.rotating_file
Write log entries to a rotating file.
Class RotatingFile
RotatingFile:RotatingFile (path, opts) | Create a new rotating file writer. |
Class RotatingFile
The Rotating File sink class.
- RotatingFile:RotatingFile (path, opts)
-
Create a new rotating file writer.
Parameters:
- path The path to the logging file.
- opts Optional parameters.
- max_size Maximum size of the file in bytes.
- max_age Maximum age of the file is seconds.
- time_format
The time format used for renaming the log, default: "%F-%H:%M:%S".
time_format documentation.
Returns:
-
A new RotatingFile sink instance.