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>
* replace async_wrap with run_sync
formatting
remove unused fn
properly raise exception, not for timeout though
* [TEST] proper startup and shutdown (#1860)
* add proper startup / shutdown in tests
* fix event loop issues
because uvloop was installed in server.py which is not the main entry point when tests are ran.
this caused the loops referenced by the locks and queues to be a different one than the one used to run the tests
(only an issue in python 3.9)
* give openapi more time, does not matter anyway, regtest takes way longer
---------
Co-authored-by: jacksn <jkranawetter05@gmail.com>
remove uvloop
* fix test
* dont touch pyproject
* fix: install uvloop in conftest
not using uvloop at all causes tests to take way longer
---------
Co-authored-by: jacksn <jkranawetter05@gmail.com>
* F821: undefine name
disabled and logged webhook_listener for opennode and lnpay because they are obviously not working
* E402: module level import not at top of file
* E721 fixes, only popped up for python3.9 not 3.10
* fixed poetry logs
* make isort happy
* Poetry: uvicorn .env and command line arguments
* restore commands.py
* format
* own it
Co-authored-by: dni <dni.khr@gmail.com>
This adds a wrapper around uvicorn using Python. This is so the
entrypoint lnbits.server can be called on the command line, and passed
arguments like port and host. This makes lnbits feel more like a real
CLI application, and lends well to running as a service in systemd