feat: add file logging (#2023)
logs into `lnbits.log` with info loglevel and `debug.log` with DEBUG loglevel files will be saved into `LNBITS_DATA_DIR`. retentions is configurable but defaults to `90 days` * added log rotation aswell --------- Co-authored-by: Vlad Stan <stan.v.vlad@gmail.com>
This commit is contained in:
@@ -37,6 +37,7 @@ def main(
|
||||
|
||||
# create data dir if it does not exist
|
||||
Path(settings.lnbits_data_folder).mkdir(parents=True, exist_ok=True)
|
||||
Path(settings.lnbits_data_folder, "logs").mkdir(parents=True, exist_ok=True)
|
||||
|
||||
# create `extensions`` dir if it does not exist
|
||||
Path(settings.lnbits_extensions_path, "extensions").mkdir(
|
||||
|
||||
Reference in New Issue
Block a user