module mlapp.base_logging
¶
Short summary¶
module lightmlrestapi.mlapp.base_logging
Machine Learning Post request
Classes¶
class |
truncated documentation |
---|---|
Simplifies logging. Logging is encrypted with module pyjwt if secret is specified. |
Functions¶
function |
truncated documentation |
---|---|
Goes through a list of logged files, reads and decrypts the content. |
Methods¶
method |
truncated documentation |
---|---|
Logs any king of data into the logs. |
|
Get the duration since |
|
Logs any king of data into the logs. |
|
Logs any king of data into the logs. |
|
Saves the times to get a duration later. |
Documentation¶
Machine Learning Post request
- class lightmlrestapi.mlapp.base_logging.BaseLogging(secret, folder='.', level=20, encoding='utf-8', when='d')¶
Bases:
object
Simplifies logging. Logging is encrypted with module pyjwt if secret is specified.
- Parameters:
secret – secret for encryption (None to avoid encryption)
folder – folder where to write the logs (None to disable the logging)
level – logging level
when – when rotating the logs, see TimedRotatingFileHandler
encoding – encoding
- __init__(secret, folder='.', level=20, encoding='utf-8', when='d')¶
- Parameters:
secret – secret for encryption (None to avoid encryption)
folder – folder where to write the logs (None to disable the logging)
level – logging level
when –
when rotating the logs, see TimedRotatingFileHandler
encoding – encoding
- _logerrorinfo(fct, msg, data)¶
Logs any king of data into the logs.
- Parameters:
msg – message
data – data to log
- error(msg, data)¶
Logs any king of data into the logs.
- Parameters:
msg – message
data – data to log
- info(msg, data)¶
Logs any king of data into the logs.
- Parameters:
msg – message
data – data to log
- save_time()¶
Saves the times to get a duration later.
- lightmlrestapi.mlapp.base_logging.enumerate_parsed_logs(folder, secret, encoding='utf-8')¶
Goes through a list of logged files, reads and decrypts the content.
- Parameters:
folder – folder which contains the logs
secret – secret
encoding – encoding
- Returns:
iterator on decrypted data