Update the Logging Level API

On this page

This API is used to update the log level for a particular FusionAuth package.

Caution

This API is subject to change and should only be used under instruction from FusionAuth support.

Request#

Set the logging level for a named logger by sending the logger name and the desired level.

Global API Key Authentication
Update the logging level by logger name
POST/api/logger

Request Headers#

Content-Type
  • Type: String
  • Required

The request body is expected to be sent using form encoded data. Ensure your HTTP client sends the Content-Type request header set to application/x-www-form-urlencoded.

Request Body#

name
  • Type: String
  • Required

The logger name for which you are requesting to update the current logging level.

level
  • Type: String
  • Required

The requested logging level. Possible values are:

  • error
  • warn
  • info
  • debug
  • trace
  • off

Response#

Response Codes
CodeDescription
200The request succeeded. The response contains a JSON body.
400The request was invalid or malformed. The response contains an Errors JSON object with the specific errors. FusionAuth also returns a 400 when the request needs a paid FusionAuth license and no license is present.
401FusionAuth didn't authorize the request. The Authorization header is missing, the API key isn't valid, or the API key doesn't have permission for this endpoint and method. The response is empty. For more information, see Unauthorized Responses.
500FusionAuth had an internal error and logged a stack trace in the FusionAuth log files. The response is empty.

Response Body#

level
  • Type: String

The logging level. If the request was successful, this value should be equal to the request value. Possible values are:

  • error
  • warn
  • info
  • debug
  • trace
  • off
Example JSON Response
{
  "level": "info"
}