Skip to content

Commit

Permalink
ooh log fancy
Browse files Browse the repository at this point in the history
  • Loading branch information
KokoseiJ committed Jan 12, 2022
1 parent 881cd65 commit 251aa33
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
6 changes: 4 additions & 2 deletions nicobot.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@
from websocket import enableTrace
from urllib.parse import urljoin
from logging import StreamHandler, FileHandler
from colorlog import ColoredFormatter


logger = logging.getLogger("nicobot")
logger.setLevel("DEBUG")
fmt = logging.Formatter("[%(levelname)s]|%(asctime)s|%(threadName)s|"
"%(funcName)s|: %(message)s")
fmt = ColoredFormatter("%(log_color)s[%(levelname)s]|%(asctime)s|"
"%(threadName)s|%(funcName)s|: %(message)s")
handler = StreamHandler(sys.stdout)
handler.setFormatter(fmt)
handler.setLevel("INFO")
Expand Down
10 changes: 8 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
PyNaCl==1.4.0
websocket-client==1.2.3
websocket-client
urllib3
PyNaCl

bs4
requests

colorlog

0 comments on commit 251aa33

Please sign in to comment.