mirror of
https://github.com/dtomlinson91/panaetius.git
synced 2025-12-21 20:55:43 +00:00
docs: update README.md with script quickstart logging
This commit is contained in:
16
README.md
16
README.md
@@ -96,6 +96,22 @@ CONFIG = panaetius.Config(
|
||||
|
||||
Set variables in the same way as the module above.
|
||||
|
||||
#### quickstart logging
|
||||
|
||||
```python
|
||||
import panaetius
|
||||
|
||||
|
||||
def get_logger():
|
||||
logging_dir = pathlib.Path(__file__).parents[0] / "logs"
|
||||
logging_dir.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
CONFIG = panaetius.Config("training_data_into_gcp", skip_header_init=True)
|
||||
panaetius.set_config(CONFIG, "logging.level", "DEBUG")
|
||||
panaetius.set_config(CONFIG, "logging.path", logging_dir)
|
||||
return panaetius.set_logger(CONFIG, panaetius.SimpleLogger(logging_level=CONFIG.logging_level))
|
||||
```
|
||||
|
||||
## Utility Functions
|
||||
|
||||
### Squasher
|
||||
|
||||
Reference in New Issue
Block a user