# Path: tenable_io/config.py
# class TenableIOConfig(object):
# 
#     @staticmethod
#     def get(key):
#         return config.get('tenable_io', key)


import json
import logging as logging_
import six
import sys
from tenable_io.config import TenableIOConfig



class LevelFilter(logging_.Filter):
    """ LevelFilter instances are used to filter messages by log level(s).
    """
    def __init__(self, levels):
        super(LevelFilter, self).__init__()
        self.levels = levels if hasattr(levels, "__iter__") else []

    def filter(self, record):
        """ Log if returns non-zero, don't if returns zero.
        """
        return record.levelno in self.levels


LOGGER_NAME = 'tenable_io'

# Path: tenable_io/config.py
# class TenableIOConfig(object):
# 
#     @staticmethod
#     def get(key):
#         return config.get('tenable_io', key)


# Path: tenable_io/log.py
import json
import logging as logging_
import six
import sys
from tenable_io.config import TenableIOConfig




class LevelFilter(logging_.Filter):
    """ LevelFilter instances are used to filter messages by log level(s).
    """
    def __init__(self, levels):
        super(LevelFilter, self).__init__()
        self.levels = levels if hasattr(levels, "__iter__") else []

    def filter(self, record):
        """ Log if returns non-zero, don't if returns zero.
        """
        return record.levelno in self.levels


LOGGER_NAME = 'tenable_io'

LOGGER_LEVEL = logging_.getLevelName(TenableIOConfig.get('logging_level'))