Hi all,

I have been using django-logging (http://code.google.com/p/django-
logging/wiki/Overview) and found it very useful. However, I configured
python logging for my project and django-logging does not display
logging messages anymore.

Here is the logging.conf I am using:

[loggers]
keys = root,xxx

[handlers]
keys = xxxHandler

[formatters]
keys = defaultFormatter


# Loggers
# ==========

[logger_root]
level = ERROR
handlers = xxxHandler

[logger_xxx
level = DEBUG
handlers = xxxHandler
qualname = xxx
propagate = 0

# Handlers
# ==========

[handler_xxxHandler]
class = handlers.RotatingFileHandler
level = DEBUG
args = ("/tmp/logs/xxx.log", 'a', 50000, 3)
formatter = defaultFormatter

# Formatters
# ==========

[formatter_defaultFormatter]
format = %(asctime)s [%(threadName)s] - %(pathname)s:[%(lineno)d] - %
(levelname)s - %(message)s
datefmt = %d-%m-%y %H:%M:%S

I then grab my logger via: logging.getLogger(__name__)

I can see all my log in the expected file, but the django-logging html
does not show them.

I see the django-logging added to the bottom of my pages but it only
says: no log entries.

Having had a look at the django-logging middleware module, I found
this:

# Initialise and register the handler
handler = ThreadBufferedHandler()
logging.root.setLevel(logging.NOTSET)
logging.root.addHandler(handler)

So my understanding is that it only attaches a handler to the root
logger but the root logger does not get called/used (not sure what the
correct term is regarding the logging module).

I have tried setting propagate=1 in my logging.conf, hoping that my
log messages would be propagated to the root logger but no...

Quite perplexed as to what the config is supposed to be.

Any idea anyone?

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

Reply via email to