Skip to content

Commit 9070fd2

Browse files
committed
Allow to set debug mode with LVMBEAT_DEBUG envvar
1 parent 34d1d22 commit 9070fd2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/lvmbeat/monitor.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ class EmailSettings:
5252
async def lifespan(app: FastAPI):
5353
"""Handles the application life-cycle."""
5454

55+
if os.getenv("LVMBEAT_DEBUG", "0") == "1":
56+
logger.setLevel(logging.DEBUG)
57+
logger.debug("Debug mode enabled.")
58+
5559
app.state = State(
5660
{
5761
"active": False,

0 commit comments

Comments
 (0)