Welcome to the Linux Foundation Forum!

Missing import in "Getting Started with Logging (4)"

RE:

https://trainingportal.linuxfoundation.org/learn/course/getting-started-with-opentelemetry-lfs148/hands-on-lab-manual-instrumentation-logs/hands-on-lab-exercises?page=4

The section with the following text:

This LoggingHandler then needs to be attached to the logging module of Python. This can be done in app.py with: 

logger = logging.getLogger()
logger.addHandler(handler)

needs to mention that from logging_utils import handler needs to also be added to app.py.

Categories

Upcoming Training