log15 icon indicating copy to clipboard operation
log15 copied to clipboard

Support configuration files

Open inconshreveable opened this issue 10 years ago • 2 comments

log15's handler interface is likely too flexible for configuration files to ever fully capture the all of the ways you could build a handler tree. That being said, it's entirely possible to define a simple configuration file format that could at least cover a large swath of the most common cases.

inconshreveable avatar May 24 '14 01:05 inconshreveable

I think this is out of scope for log15. Each application/project should handle configuration as appropriate. Anything we do in log15 will most likely create friction with other aspects of configuration for the application.

ChrisHines avatar May 14 '15 00:05 ChrisHines

+1 I think this will be most useful. Django supports logging configuration. Here is an example

LOGGING = {
    'version': 1,
    'disable_existing_loggers': False,
    'handlers': {
        'file': {
            'level': 'DEBUG',
            'class': 'logging.FileHandler',
            'filename': '/path/to/django/debug.log',
        },
    },
    'loggers': {
        'django.request': {
            'handlers': ['file'],
            'level': 'DEBUG',
            'propagate': True,
        },
    },
}

from https://docs.djangoproject.com/en/1.8/topics/logging/

prashanthellina avatar Nov 24 '15 21:11 prashanthellina