linotp.controllers.maintenance module¶
- class linotp.controllers.maintenance.MaintenanceController(name, install_name='', **kwargs)¶
Bases:
BaseController
The maintenance controller is an internal interface for maintainers to change certain parameters (such as log levels) at runtime
- check_status()¶
GET, POST /maintenance/check_status
Deprecated since version 3.2: Requests using HTTP POST method (because it is only reading data). This endpoint will only be available via HTTP GET method in the future.
simple check if LinOTP backend services are up and running
support for checking that the Config database could be accessed
- Returns
a json result with a boolean status and request result
- Raises
Exception – if an error occurs an exception is serialized and returned
- setLogLevel()¶
POST /maintenance/setLogLevel
set the log level of a certain logger which is identified by the url parameter loggerName.
example call:
POST /maintenance/setLogLevel loggerName=linotp.lib.user level=10
(sets the log level of the user library to DEBUG) if loggerName is omitted, the root logger is assumed.
- Parameters
loggerName – the name of the logger
level – the logging level
- Returns
a json result with a boolean status and request result
- Raises
Exception – if an error occurs an exception is serialized and returned