diff options
Diffstat (limited to 'src/pyssg/__init__.py')
-rw-r--r-- | src/pyssg/__init__.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/pyssg/__init__.py b/src/pyssg/__init__.py index 074ae72..cdd4cd1 100644 --- a/src/pyssg/__init__.py +++ b/src/pyssg/__init__.py @@ -1,4 +1,19 @@ from .pyssg import main +import logging +from logging import Logger, StreamHandler +from .per_level_formatter import PerLevelFormatter -__all__ = ['main'] +# since this is the root package, setup the logger here, +# set DEBUG here for testing purposes, can't make it +# dynamic yet (with a flag, for example) +__LOG_LEVEL: int = logging.INFO +log: Logger = logging.getLogger(__name__) +log.setLevel(__LOG_LEVEL) +ch: StreamHandler = StreamHandler() +ch.setLevel(__LOG_LEVEL) +ch.setFormatter(PerLevelFormatter()) +log.addHandler(ch) + +# not meant to be used as a package, so just give main +__all__ = ['main']
\ No newline at end of file |