module apps.common.log_app

Inheritance diagram of mathenjeu.apps.common.log_app

Short summary

module mathenjeu.apps.common.log_app

Starts an application.

source on GitHub

Classes

class

truncated documentation

LogApp

Defines methods to easily log information for a web application. The function fct_session returns information …

Methods

method

truncated documentation

__init__

log_any

Logs information.

log_event

Logs information about events.

Documentation

Starts an application.

source on GitHub

class mathenjeu.apps.common.log_app.LogApp(folder='.', secret_log=None, fct_session=None, **kwargs)[source]

Bases : lightmlrestapi.mlapp.base_logging.BaseLogging

Defines methods to easily log information for a web application. The function fct_session returns information about the session whatever it is as a dictionary.

source on GitHub

Paramètres
  • fct_session – function to return information about a session

  • secret_log – to encrypt log (None to ignore)

  • folder – folder where to write the logs (None to disable the logging)

  • kwargs – additional parameters for BaseLogging

source on GitHub

__init__(folder='.', secret_log=None, fct_session=None, **kwargs)[source]
Paramètres
  • fct_session – function to return information about a session

  • secret_log – to encrypt log (None to ignore)

  • folder – folder where to write the logs (None to disable the logging)

  • kwargs – additional parameters for BaseLogging

source on GitHub

log_any(tag, msg, request, session=None, **data)[source]

Logs information.

Paramètres
  • tag – tag (to filter rows in logs)

  • msg – event kind

  • request – request

  • session – information about the session

  • data – addition data

source on GitHub

log_event(msg, request, session=None, **data)[source]

Logs information about events.

Paramètres
  • msg – event kind

  • request – request

  • session – information about the session

  • data – addition data

source on GitHub