Changes between Initial Version and Version 1 of Ticket #27691, comment 1


Ignore:
Timestamp:
Jan 9, 2017, 2:35:29 AM (8 years ago)
Author:
Thomas Güttler

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #27691, comment 1

    initial v1  
    33Is there a reason you can't instantiate the logger after all of your imports instead of in the middle of them?
    44
    5 > Is there no way to avoid this logger = logging.getLogger(__name__) ?
     5> Is there no way to avoid this logger = logging.getLogger(!__name!__) ?
    66
    77I don't think so if you want to create a namespaced logger. If you don't mind logging all of your messages in the ''root'' namespace and relying on a formatter to describe their origin nothing prevents you from doing it (by using logging directly) but I don't think it's a practice we should encourage as the main strength of the logging framework lies in per-namespace routing of messages.
Back to Top