Skip to content

Commit

Permalink
Add annotation for logger class
Browse files Browse the repository at this point in the history
	modified:   browserium/utility/logger.py
  • Loading branch information
machine-head committed Jan 26, 2019
1 parent 4213bfc commit b2aa488
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions browserium/utility/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,27 @@

class Logger(object):

@classmethod
def log_info(self, informationMessage):
logging.basicConfig(format='%(asctime)s - %(levelname)s - %(message)s', datefmt='%d-%b-%y %H:%M:%S', level=logging.INFO)
logging.info(informationMessage)

@classmethod
def log_error(self, errorMessage):
logging.basicConfig(format='%(asctime)s - %(levelname)s - %(message)s', datefmt='%d-%b-%y %H:%M:%S', level=logging.ERROR)
logging.info(errorMessage)

@classmethod
def log_debug(self, debugMessage):
logging.basicConfig(format='%(asctime)s - %(levelname)s - %(message)s', datefmt='%d-%b-%y %H:%M:%S', level=logging.DEBUG)
logging.info(debugMessage)

@classmethod
def log_warning(self, warningMessage):
logging.basicConfig(format='%(asctime)s - %(levelname)s - %(message)s', datefmt='%d-%b-%y %H:%M:%S', level=logging.WARNING)
logging.info(warningMessage)

@classmethod
def log_critical(self, criticalMessage):
logging.basicConfig(format='%(asctime)s - %(levelname)s - %(message)s', datefmt='%d-%b-%y %H:%M:%S', level=logging.CRITICAL)
logging.critical(criticalMessage)

0 comments on commit b2aa488

Please sign in to comment.