Skip to content

Commit

Permalink
Merge pull request #118 from browserium/develop
Browse files Browse the repository at this point in the history
Add annotation for logger class
  • Loading branch information
Corefinder89 authored Jan 26, 2019
2 parents 8abc4ea + b2aa488 commit 91b5acc
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 91b5acc

Please sign in to comment.