for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
"""Module which contains logging configuration."""
# pylint: disable=line-too-long
import logging.config
LOG = logging.getLogger(__name__)
class LoggingConfiguration:
"""Contains configuration for logging."""
@staticmethod
def init():
"""
Initialize logging.
logging.config.dictConfig(LoggingConfiguration._get_dict_config())
LOG.debug('Logger configured successfully!')
@classmethod
def _get_dict_config(cls):
The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:
class SomeClass: def some_method(self): """Do x and return foo."""
If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.
return {
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'standard': {
'format': '%(asctime)s [%(levelname)s] %(name)s %(lineno)d: %(message)s'
},
'handlers': {
'default': {
'level': 'INFO',
'formatter': 'standard',
'class': 'logging.StreamHandler',
'file': {
'level': 'DEBUG',
'class': 'logging.handlers.RotatingFileHandler',
'filename': 'grortir.log'
'file_result': {
'filename': 'grortir-results.log'
}
'loggers': {
'': {
'handlers': ['default', 'file'],
'propagate': True
'results_logger': {
'handlers': ['file_result'],