@@ -0,0 +1,1231 @@
+#!/usr/bin/env python%0A%0Aimport os%0Aimport sys%0Aimport logging%0Aimport logging.handlers%0A%0Aclass Logger():%0A    %0A    _logger=None%0A    %0A    def __init__(self, name, file_path, log_level=logging.DEBUG):%0A        self.name = name%0A        self.file_path = file_path%0A        self.log_level = log_level%0A%0A    def get_logger(self):%0A        %22%22%22%0A         Using a getLogger interface for now because in the future we might want%0A         to return our own instance of Logger and inject custom data onto the%0A         logging string behond the ability of the Python Logging's formatting abilities,%0A         These could be dynamically formatted server IP address, user ID, worker%0A         process IDs.  For now we will simply return the Python Logger.%0A        %22%22%22%0A        Logger._logger = logging.getLogger(self.name)%0A        Logger._logger.setLevel(self.log_level)%0A%0A        file_handler = logging.handlers.RotatingFileHandler(%0A            self.file_path,%0A            maxBytes=1000000,%0A            backupCount=5,%0A            delay=True)%0A%0A        formatter = logging.Formatter('%25(asctime)s %5B%25(levelname)s%5D %25(name)s - %25(message)s')%0A        file_handler.setFormatter(formatter)%0A%0A        Logger._logger.addHandler(file_handler)%0A%0A        return Logger._logger%0A

Add logger