Commit 490ab09a authored by Robin Obůrka's avatar Robin Obůrka

Provide logging feature

parent 11289d11
......@@ -2,3 +2,16 @@ from sn.exceptions import *
from sn.messages import *
from sn.argparser import *
from sn.network import *
import logging
import logging.handlers
logging.basicConfig(
level=logging.INFO,
format="sentinel: %(levelname)s [%(name)s.%(funcName)s:%(lineno)d] %(message)s",
datefmt="%Y-%m-%d %H:%M:%S",
handlers=[
logging.FileHandler("sentinel.log", encoding="UTF-8"),
logging.handlers.SysLogHandler(address="/dev/log"),
],
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment