Smile CDR v2024.05.PRE
On this page:

34.13.1Troubleshooting Log Endpoint

 

The Troubleshooting Log endpoint can be used to fetch and update the troubleshooting log configuration.

Note that configuration updated via Troubleshooting Log Endpoint is not persisted and will be restored to default after the Smile CDR restart.

34.13.2Fetch Troubleshooting Log Configuration

 
This method requires the ACCESS_ADMIN_JSON permission.

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 a package, a java class, or one of the pre-defined troubleshooting logger's names, see Troubleshooting Logs for possible values.
  • "loggerLevel" : "DEBUG" – level of the logging; possible values: OFF, ERROR, WARN, INFO, DEBUG, TRACE, ALL.

34.13.3Update Troubleshooting Logger Level

 
This method requires the ACCESS_ADMIN_JSON permission.

This method will update the logging level of the provided logger (package, java class, or pre-defined troubleshooting 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 a package, a java class, or one of the pre-defined troubleshooting log names, 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.

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"
}

34.13.4Update Troubleshooting Log Configuration

 
This method requires the ACCESS_ADMIN_JSON permission.

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":"org.hibernate.sql",
      "loggerLevel":"DEBUG"
   },
   {
      "loggerName":"ca.uhn.fhir.jpa.dao.BaseHapiFhirResourceDao",
      "loggerLevel":"DEBUG"
   }
]

34.13.4.1Parameters

Required:

  • loggerName – The name of the logger; it could be a package, a java class, or one of the pre-defined troubleshooting logger's names, see Troubleshooting Logs for possible values.
  • loggerLevel – The level of the logging; possible values: OFF, ERROR, WARN, INFO, DEBUG, TRACE, ALL.

Response:
Upon successful update, this method will return a 200 "ok" status with the contents of the updated log configuration as the response body.