module apps.common.log_app
¶
Short summary¶
module mathenjeu.apps.common.log_app
Starts an application.
Classes¶
class |
truncated documentation |
---|---|
Defines methods to easily log information for a web application. The function fct_session returns information … |
Methods¶
method |
truncated documentation |
---|---|
Logs information. |
|
Logs information about events. |
Documentation¶
Starts an application.
- class mathenjeu.apps.common.log_app.LogApp(folder='.', secret_log=None, fct_session=None, **kwargs)¶
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.
- 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
- __init__(folder='.', secret_log=None, fct_session=None, **kwargs)¶
- 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
- log_any(tag, msg, request, session=None, **data)¶
Logs information.
- Paramètres
tag – tag (to filter rows in logs)
msg – event kind
request – request
session – information about the session
data – addition data
- log_event(msg, request, session=None, **data)¶
Logs information about events.
- Paramètres
msg – event kind
request – request
session – information about the session
data – addition data