On May 25, 10:27 am, Jacob Kaplan-Moss <ja...@jacobian.org> wrote:
> At first glance, though, I'm thinking this looks pretty good -- though
> the log config file is giving me slight flashbacks to
> log4j.properties... /me shudders.

Do you mean this bit?

LOGGING = {
    'version': 1,
    'formatters': {
        'default': {
            'format': '%(asctime)s %(levelname)-1.1s [%(name)s] %
(message)s',
        },
    },
    'handlers': {
        'file': {
            'class': 'logging.FileHandler',
            'filename': '/tmp/logtest.log',
            'mode': 'w',
            'formatter': 'default',
        },
        'sqlfile': {
            'class': 'logging.FileHandler',
            'filename': '/tmp/logtest-sql.log',
            'mode': 'w',
            'formatter': 'default',
        },
    },
    'root' : {
        'level' : 'WARNING',
        'handlers' : ['file'],
    },
    'loggers': {
        'logtest': { 'level': 'INFO' },
        'django': { 'handlers': ['file'] },
        'django.core.urlresolvers': { 'level': 'DEBUG' },
        'django.core.handlers.base': { 'level': 'DEBUG' },
        'django.db.models.loading': { 'level': 'DEBUG' },
        'django.db.backends.util': { 'level': 'DEBUG', 'propagate':
False,
                                     'handlers': ['sqlfile'] },
    },
}

That's using the PEP 391 schema which has been approved and
implemented in Python for 2.7/3.2. Obviously it's not the most minimal
configuration in this example - just something to illustrate multiple
log files (SQL and everything else) and the ability to set verbosity
of logging differently for different bits of Django. I'm not proposing
that this be the default for a Django settings.py file as created by
"django-admin.py startproject". A much simpler configuration is
possible, and no doubt we'll come up with one as the recipe gets
baked.

As far as the IRC thing goes - I'll try to be around Thursday and
Friday so that I can hook up with you on #django-sprint.

Regards,

Vinay Sajip

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-develop...@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to