Singleton Logger (logging)


/ Published in: Python
Save to your folder(s)

To use it, just change PATH and LOG_FILENAME in the source so that you save your .log file wherever you want.

Then just do:

foo = Logger("foo")

bar = Logger("bar")

foo.debug("debugging foo :D")

bar.info("informing bar :P")

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.