Skip to main content

Logs

The Logs method allows all information that is neither an error, not an activity to be logged.

The log method consists of 2 parameters:

  • (string) message - Name of the activity
  • (object) params - Parameters
from streply.capture import log

log('A log message')

If you want, you can use logging module:

from streply.utils import logger

logger.debug("A debug message")
logger.info("An info message")
logger.warning("A warning message")
logger.error("An error message")
logger.critical("A critical message")

As a second parameter, we can add additional information that is important to us and not present in the error object (e.g. user ID).

For example, a failure message can be added as a parameter:

from streply.utils import logger

logger.info("A info message", {
'message': message
})

Logs formatting

See how to format logs.