Introduction to Python Logging in Synapse Notebooks

The first step on the road to implementing observability in your Python notebooks is basic logging . In this post, we look at how you can use Python's built in logging inside a Synapse notebook .

Introduction to Python Logging in Synapse Notebooks Jonathan George07/03/2024 The first step on the road to implementing observability in your Python notebooks is basic logging . In this post, we look at how you can use Python's built in logging inside a Synapse notebook .
How to Setup Logging for your Python Notebooks in under 2 Minutes

How to Setup Logging for your Python Notebooks in under 2 Minutes A step-by-step guide to understand, install, use, and enjoy the standard logging package in Python
How to Setup Logging for your Python Notebooks in under 2 Minutes A step-by-step guide to understand, install, use, and enjoy the standard logging package in Python Dr. Gregor Scheithauer Follow

Introduction to Azure Synapse Studio Notebooks.ipynb
Introduction to Azure Synapse Studio Notebooks An Azure Synapse Studio notebook is a web interface for you to create files that contain live code, visualizations, and narrative text. Notebooks are a good place to validate ideas and use quick experiments to get insights from your data.
"An Azure Synapse Studio notebook is a web interface for you to create files that contain live code, visualizations, and narrative text. Notebooks are a good place to validate ideas and use quick experiments to get insights from your data. Notebooks are also widely used in data preparation, data visualization, machine learning, and other Big Data scenarios.\n",
Create, develop, and maintain Synapse notebooks
In this article, you learn how to create and develop Synapse notebooks to do data preparation and visualization.
and while it works locally (instead of logging -messages I see the "This is a logging line" in my normal stdout) - I still don't see any logging messages in Synapse . What do I have to configure to be able to see the logger.info messages below the Synapse Notebook cells when I import and execute the module in Synapse ? I tried the following solution from the comments, but it didn't get anywhere.

Key Details About Introduction To Python Logging In Synapse Notebooks
The logging module in Python is a ready- to -use and powerful module that is designed to meet the needs of beginners as well as enterprise teams. It is used by most of the third-party Python libraries, so you can integrate your log messages with the ones from those libraries to produce a homogeneous log for your application.







A primary use case is to allow both automated and manual in -depth troubleshooting based on the notebook cell contents including examining many individual log entries as well as stacktraces. Since the notebook could fail in one of a number of cells we would be looking for an API that allows access to the cell-level structure of the notebook output.