I would like to see the custom logs that I create inside an AWS Sagemaker JupyterLab notebook (that uses a Glue development endpoint). I want to see them as the output of a notebook cell.
I tried with:
import logging
logger = logging.getLogger()
logger.setLevel(logging.DEBUG)
logger.info("I want to see it as output in my notebook cell.")
and also with:
sc = SparkContext.getOrCreate()
glueContext = GlueContext(sc)
logger = glueContext.get_logger()
logger.info("I want to see it as output in my notebook cell.")
but both give no output, in comparison to a print("Hi")
which correctly gives the "Hi" output on the notebook.
Although I want the logs on the notebook itself, I've also checked if they are available as CloudWatch Logs, but there the logs of my notebook look like [W 10:42:34.540 NotebookApp] zmq message arrived on closed channel
(in any case, I want them on the notebook, not in CloudWatch).
Many thanks