How to use the oasislmf.utils.log.read_log_config function in oasislmf

To help you get started, we’ve selected a few oasislmf examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github OasisLMF / OasisPlatform / src / conf / iniconf.py View on Github external
def setup_logging(self, section):
        """
        Read an Oasis standard logging config
        """
        log_dir = self.get(section, 'LOG_DIRECTORY')
        log_filename = self.get(section, 'LOG_FILENAME')
        log_path = os.path.join(log_dir, log_filename)

        read_log_config({
            'LOG_FILE': log_path,
            'LOG_LEVEL': self.get(section, 'LOG_LEVEL'),
            'LOG_MAX_SIZE_IN_BYTES': self.getint(section, 'LOG_MAX_SIZE_IN_BYTES'),
            'LOG_BACKUP_COUNT': self.getint(section, 'LOG_BACKUP_COUNT'),
        })
github OasisLMF / OasisPlatform / src / conf / settings.py View on Github external
def setup_logging(self, section):
        """
        Read an Oasis standard logging config
        """
        log_dir = self.get(section, 'LOG_DIRECTORY')
        log_filename = self.get(section, 'LOG_FILENAME')
        log_path = os.path.join(log_dir, log_filename)

        read_log_config({
            'LOG_FILE': log_path,
            'LOG_LEVEL': self.get(section, 'LOG_LEVEL'),
            'LOG_MAX_SIZE_IN_BYTES': self.getint(section, 'LOG_MAX_SIZE_IN_BYTES'),
            'LOG_BACKUP_COUNT': self.getint(section, 'LOG_BACKUP_COUNT'),
        })