Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #67656 > unrolled thread

Logging

Started byIgor Korot <ikorot01@gmail.com>
First post2014-03-04 02:02 -0800
Last post2014-03-04 02:02 -0800
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  Logging Igor Korot <ikorot01@gmail.com> - 2014-03-04 02:02 -0800

#67656 — Logging

FromIgor Korot <ikorot01@gmail.com>
Date2014-03-04 02:02 -0800
SubjectLogging
Message-ID<mailman.7698.1393927340.18130.python-list@python.org>
Hi, ALL,
Could someone please explain to me how the code in
http://docs.python.org/2/howto/logging#logging-from-multiple-modules
works?
In particular I'm interested in how the mylib.py knows about the myapp.log.

What I mean is: logging object is not passed to mylib.py, so
essentially it should create a new instance of the logging object.

What am I missing?

But this question comes from the following fact about my application.
I tried to create a logging object which will store the logging
information to the file in the main class. Then I pass this object to
another class constructor and use it in that second class.

Upon running everything is OK, but when the program successfully
finishes, the log file has 0 length.

AFAIU, I'm doing it properly and the example referenced is wrong, yet
the results are completely different.

Thank you for any expplanation.

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web