Skip to content

Commit

Permalink
新增logger
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiao777774 committed Sep 12, 2020
1 parent b9413ed commit 77b4a5c
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,29 @@
import time
import logging
from threading import Thread


class Logger:
def __init__(self):
logging.basicConfig(
format = '%(asctime)s : %(levelname)s : %(message)s',
level = logging.INFO)

def info(self, message):
logging.info(message)

def warning(self, message):
logging.warning(message)

def error(self, message):
logging.error(message)

def critical(self, message):
logging.critical(message)

logger = Logger()


class Timer:
def __init__(self):
self._start_time = None
Expand Down

0 comments on commit 77b4a5c

Please sign in to comment.