Gelonida N wrote: > > On 08/20/2011 06:51 AM, Scott Danzig wrote: > You have to be sure, that logging is configured before actually logging > anything. > > So before your three lines: >> import logging >> logger = logging.getLogger('otherlogger') >> logger.warn('hello') > you had to be sure, that the django settings and thus the logging > configuration has really been completed. > > You could for example add following two lines before: >> from django.conf import settings >> LOGGING = settings.LOGGING # force import > > The second line is needed, as the first line is a 'lazy import' and will > only read the settings and configure logging when you access the first > time a element of settings. > I just used settings.LOGGING, as it should always exist, when you try to > log. >
Thanks Gelonida.. tried your suggestion and added those two lines before my import logging ... unfortunately no change. Perhaps it's not straightforward. Sounds like it wasn't obvious to you either. -- View this message in context: http://old.nabble.com/Django-1.3-logging-not-working-as-I%27d-expect-tp32299898p32349240.html Sent from the django-users mailing list archive at Nabble.com. -- 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.