Source code for espargos

#!/usr/bin/env python3

from .exithandler import ExitHandler
from .pool import ClusteredCSI
from .backlog import CSIBacklog
from .board import Board
from .pool import Pool
import logging
import sys

__version__ = "0.1.1"
__title__ = "pyespargos"
__description__ = "Python library for working with the ESPARGOS WiFi channel sounder"
__uri__ = "http://github.com/ESPARGOS/pyespargos"

[docs] class Logger: """ Logger class for pyespargos. This class is a singleton and should be used to modify the logging level of the library. """ logger = logging.getLogger("pyespargos") stderrHandler = logging.StreamHandler(sys.stderr) stderrHandler.setFormatter(logging.Formatter("[%(name)-20s] %(message)s")) logger.addHandler(stderrHandler) logger.setLevel(level = logging.INFO)
[docs] @classmethod def get_level(cls): """ Returns the current logging level of the logger. """ return cls.log.getEffectiveLevel()
[docs] @classmethod def set_level(cls, level): """ Sets the logging level of the logger. """ cls.log.setLevel(level=level)