diff --git a/README.md b/README.md index 759d4fd..5e975d0 100644 --- a/README.md +++ b/README.md @@ -1657,6 +1657,46 @@ def get_border(screen): ``` +Logging +------- +```python +# $ pip3 install loguru +from loguru import logger +``` + +```python +logger.add('debug_{time}.log', colorize=True) # Connects a log file. +logger.add('error_{time}.log', level='ERROR') # Adds another file for errors or higher. +logger.('A logging message') +``` +* **Levels: `'debug'`, `'info'`, `'success'`, `'warning'`, `'error'`, `'critical`'.** + +### Rotation +Parameter that sets a condition when a new log file is created. +```python +rotation=||| +``` +* **`''` - Max file size in bytes.** +* **`'`' - Max age of a file.** +* **`'