import logging
class Test(object):
def __init__(self):
logging.basicConfig(filename = "", level = logging.INFO)
#some rubbish insert here
a = Test()
logging.info("FINITO Runnito")
The logging bit has been initialized inside the class and when i used it outside the class, it did not complain. It run and saved the log to the file. My question is: is the logging part present all over the current .py file and whether when im doing all the "logging.basicConfig()..." <-- am i actually creating a logging object or i am just getting the module ready to work.

New Topic/Question
Reply



MultiQuote




|