Skip to main content

Logging

In MINEO there is a built-in logging system that allows you to log custom messages during a Code Block's execution. This is useful for debugging and monitoring your code. The logging system is based on the logging module of Python.

Usage

To use the logging system you just need to operate with the logger object with its methods. The logger object is a global variable that is available in the kernel context and is an instance of python's Logger object.

Even though all the methods of the logger object are available, the most common and the ones with a special display in the logs are:

  • logger.info()
  • logger.warning()
  • logger.error()
  • logger.debug()

Execution logs

There are some events that are logged automatically by the system. These are:

  • The beginning of the execution of a Block
  • The successful execution of a Block
  • The failure of a Block

Displaying the logs

The logs are stored in a file associated with the Notebook. To view the logs click on the View Logs option under the Kernel menu. This will open a new tab with the logs of the current Notebook. Check the Logs documentation for more information.

For example, the display of the following logs:

logger.info("INFO log")
logger.warning("WARNING log")
logger.error("ERROR log")
logger.debug("DEBUG log")
raise Exception("Error raised")
Logging Display