Skip to content

Commit 9000067

Browse files
pinheadmzwillcl-ark
authored andcommitted
warnetd: restore log to stdout if not daemon
1 parent 0c106e2 commit 9000067

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/warnet/warnetd.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from collections import defaultdict
1212
from datetime import datetime
1313
from logging.handlers import RotatingFileHandler
14+
from logging import StreamHandler
1415
from typing import List, Dict
1516
from flask import Flask
1617
from flask_jsonrpc.app import JSONRPC
@@ -53,7 +54,8 @@
5354
handlers=[
5455
RotatingFileHandler(
5556
LOG_FILE_PATH, maxBytes=16_000_000, backupCount=3, delay=True
56-
)
57+
),
58+
StreamHandler(sys.stdout)
5759
],
5860
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
5961
)

0 commit comments

Comments
 (0)