Logging

I

Igor Korot

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top