The Troubleshooting Log endpoint can be used to fetch and update the troubleshooting log configuration.
TRACE or ALL, and security-sensitive loggers (such as authentication and authorization providers, whose classes can log credentials or tokens) cannot be set finer than INFO.
This method will return a list of configured troubleshooting logs. This list will contain pre-defined troubleshooting logs (see Troubleshooting Logs) as well as any custom troubleshooting log configuration.
To invoke:
GET http://localhost:9000/troubleshooting-log/configuration
The server will produce a response resembling the following:
[
{
"loggerName": "ca.cdr.log.hl7v2_troubleshooting",
"loggerLevel": "OFF"
},
{
"loggerName": "ca.cdr.log.http_troubleshooting",
"loggerLevel": "DEBUG"
}
]
For brevity, only 2 logger entries are shown, but a real response might contain many more.
Note the following details:
"loggerName": "ca.cdr.log.hl7v2_troubleshooting" – name of the logger; it can be one of the pre-defined troubleshooting logger's names, or another Smile CDR or HAPI FHIR logger, see Troubleshooting Logs for possible values."loggerLevel" : "DEBUG" – level of the logging; possible values: OFF, ERROR, WARN, INFO, DEBUG, TRACE, ALL.This method will update the logging level of the provided logger (a pre-defined troubleshooting logger, or another Smile CDR or HAPI FHIR logger).
To invoke (substitute a logger name into the path below):
PUT or POST http://localhost:9000/troubleshooting-log/configuration/{logger_name}?loggerLevel=DEBUG
Note the following path element:
logger_name – The name of the logger; it could be one of the pre-defined troubleshooting log names, or another Smile CDR or HAPI FHIR logger, see Troubleshooting Logs for possible values.Required URL parameter:
loggerLevel=[string] – The level of the logging; possible values: OFF, ERROR, WARN, INFO, DEBUG, TRACE, ALL. Note that TRACE and ALL are only permitted for the pre-defined troubleshooting loggers, and security-sensitive loggers (such as authentication and authorization providers) cannot be set finer than INFO.Response:
Upon successful update, this method will return a 200 "ok" status with the contents of the updated troubleshooting log as the response body.
{
"loggerName": "ca.cdr.log.hl7v2_troubleshooting",
"loggerLevel": "DEBUG"
}
This method updates the troubleshooting log configuration according to the provided request.
POST http://localhost:9000/troubleshooting-log/configuration
Content-Type: application/json
[
{
"loggerName":"ca.uhn.fhir.log.mdm_troubleshooting",
"loggerLevel":"DEBUG"
},
{
"loggerName":"ca.uhn.fhir.jpa.dao.BaseHapiFhirResourceDao",
"loggerLevel":"DEBUG"
}
]
Required:
loggerName – The name of the logger; it could be one of the pre-defined troubleshooting logger's names, or another Smile CDR or HAPI FHIR logger, see Troubleshooting Logs for possible values.loggerLevel – The level of the logging; possible values: OFF, ERROR, WARN, INFO, DEBUG, TRACE, ALL. Note that TRACE and ALL are only permitted for the pre-defined troubleshooting loggers, and security-sensitive loggers (such as authentication and authorization providers) cannot be set finer than INFO.Response:
Upon successful update, this method will return a 200 "ok" status with the contents of the updated log configuration as the response body.
You are about to leave the Smile Digital Health documentation and navigate to the Open Source HAPI-FHIR Documentation.