I have a core python library (over which I have read only access). This core lib has the below statements (note: logging set to NullHandler)
logger = logging.getLogger(__name__)
logger.addHandler(logging.NullHandler())
At places, the core lib, also has statements for logging INFO level messages, such as,
logger.info("In test1")
At some point later,
logger.info("In test2")
I am trying to pull the logs from the core lib using my python client. In the python client, I add the below statements:
import logging
logger = logging.getLogger('myapp')
hdlr = logging.FileHandler('temp.log')
logger.addHandler(hdlr)
logger.setLevel(logging.INFO)
But, this would only log the INFO level messages local to my client script.
Que:Is there a way I could tweak my client to pull logs from the core lib?