AdvancedLoggingResource Resource

AdvancedLoggingResource REST endpoint to access and manipulate the system logging level SWAGGER CONTRACT: https://app.swaggerhub.com/apis/WANdisco/logging/1.0.0

GET /logger/level

Get the current global log level example CURL command to get current root logger level: curl -I -u admin:pass -H "Content-Type: text/plain" -X GET "http://{host}:{port}/api/logger/level"

Response Codes
code condition
200 Ok
503 Service Unavailable - unable to get/retrieve LogLevelAdjustor implementation
Response Body
media type data type description
text/plain (custom) response

Example

Request
GET /logger/level
Content-Type: */*
Accept: text/plain

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: text/plain

                
...
                
              

GET /logger/levels

Get a list of the valid log levels. example CURL command to get all available valid logger levels: curl -I -u admin:pass -H "Content-Type: application/json" -X GET "http://{host}:{port}/api/logger/levels"

Response Codes
code condition
200 Ok
503 Service Unavailable - unable to get/retrieve LogLevelAdjustor implementation
Response Body
media type data type description
application/json ResponseImpl (JSON) response
application/xml responseImpl (XML)

Example

Request
GET /logger/levels
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "entity" : { },
  "statusType" : {
    "reasonPhrase" : "...",
    "statusCode" : 12345,
    "family" : "REDIRECTION"
  },
  "entityType" : {
    "typeName" : "..."
  },
  "status" : 12345,
  "metadata" : {
    "property1" : [ { }, { } ],
    "property2" : [ { }, { } ]
  }
}
                
              

GET /logger/loggers

Get all currently modified loggers example CURL command to all currently modified loggers: curl -I -u admin:pass -H "Content-Type: application/json" -X GET "http://{host}:{port}/api/logger/loggers"

Response Codes
code condition
200 Ok
503 Service Unavailable - unable to get/retrieve LogLevelAdjustor implementation
Response Body
media type data type description
application/json ResponseImpl (JSON) response
application/xml responseImpl (XML)

Example

Request
GET /logger/loggers
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "entity" : { },
  "statusType" : {
    "reasonPhrase" : "...",
    "statusCode" : 12345,
    "family" : "SUCCESSFUL"
  },
  "entityType" : {
    "typeName" : "..."
  },
  "status" : 12345,
  "metadata" : {
    "property1" : [ { }, { } ],
    "property2" : [ { }, { } ]
  }
}
                
              

POST /logger/reload

Reload log levels from file. Clears customizations made to logging since the last time the log config file was persisted. example CURL command to reset all custom logging settings: curl -I -u admin:pass -H "Content-Type: application/json" -X POST "http://{host}:{port}/api/logger/reload"

Response Codes
code condition
204 No Content - Operation completed successfully
503 Service Unavailable - unable to get/retrieve LogLevelAdjustor implementation
Response Body
media type data type description
application/json ResponseImpl (JSON) Http Response, see statusCodes.
application/xml responseImpl (XML)

Example

Request
POST /logger/reload
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 204 No Content
Content-Type: application/json

                
{
  "entity" : { },
  "statusType" : {
    "reasonPhrase" : "...",
    "statusCode" : 12345,
    "family" : "SUCCESSFUL"
  },
  "entityType" : {
    "typeName" : "..."
  },
  "status" : 12345,
  "metadata" : {
    "property1" : [ { }, { } ],
    "property2" : [ { }, { } ]
  }
}
                
              

POST /logger/reset

Reset all logging level back to factory defaults. Clears customizations made to logging, including persisted changes, and restores the default configuration. example CURL command to reset all custom logging settings: curl -I -u admin:pass -H "Content-Type: application/json" -X POST "http://{host}:{port}/api/logger/reset"

Response Codes
code condition
204 No Content - Operation completed successfully
503 Service Unavailable - unable to get/retrieve LogLevelAdjustor implementation
Response Body
media type data type description
application/json ResponseImpl (JSON) response
application/xml responseImpl (XML)

Example

Request
POST /logger/reset
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 204 No Content
Content-Type: application/json

                
{
  "entity" : { },
  "statusType" : {
    "reasonPhrase" : "...",
    "statusCode" : 12345,
    "family" : "REDIRECTION"
  },
  "entityType" : {
    "typeName" : "..."
  },
  "status" : 12345,
  "metadata" : {
    "property1" : [ { }, { } ],
    "property2" : [ { }, { } ]
  }
}
                
              

POST /logger/save

Save current in-memory logging customizations to the custom configuration file.

Response Codes
code condition
204 No Content - Operation completed successfully
503 Service Unavailable - unable to get/retrieve LogLevelAdjustor implementation
Response Body
media type data type description
application/json ResponseImpl (JSON) Http Response
application/xml responseImpl (XML)

Example

Request
POST /logger/save
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 204 No Content
Content-Type: application/json

                
{
  "entity" : { },
  "statusType" : {
    "reasonPhrase" : "...",
    "statusCode" : 12345,
    "family" : "SUCCESSFUL"
  },
  "entityType" : {
    "typeName" : "..."
  },
  "status" : 12345,
  "metadata" : {
    "property1" : [ { }, { } ],
    "property2" : [ { }, { } ]
  }
}
                
              

GET /logger/{logger}

Get logger for name provided example CURL command to get logger: curl -I -u admin:pass -H "Content-Type: application/json" -X GET "http://{host}:{port}/api/logger/com.wandisco"

Request Parameters
name type description
logger path the name of the logger to retrieve
Response Codes
code condition
200 Ok
400 Bad Request - see Exception
503 Service Unavailable - unable to get/retrieve LogLevelAdjustor implementation
Response Body
media type data type description
application/json ResponseImpl (JSON) response
application/xml responseImpl (XML)

Example

Request
GET /logger/{logger}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "entity" : { },
  "statusType" : {
    "reasonPhrase" : "...",
    "statusCode" : 12345,
    "family" : "CLIENT_ERROR"
  },
  "entityType" : {
    "typeName" : "..."
  },
  "status" : 12345,
  "metadata" : {
    "property1" : [ { }, { } ],
    "property2" : [ { }, { } ]
  }
}
                
              

PUT /logger/level/global

Set the global log level example CURL command to update global log level to DEBUG: curl -I -u admin:pass -H "Content-Type: application/json" -X PUT "http://{host}:{port}/api/logger/level/global?level=DEBUG"

Request Parameters
name type description
level query String of the level to set e.g. DEBUG
Response Codes
code condition
204 No Content - Operation completed successfully
400 Bad Request - see Exception
503 Service Unavailable - unable to get/retrieve LogLevelAdjustor implementation
Response Body
media type data type description
application/json ResponseImpl (JSON) response
application/xml responseImpl (XML)

Example

Request
PUT /logger/level/global
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 204 No Content
Content-Type: application/json

                
{
  "entity" : { },
  "statusType" : {
    "reasonPhrase" : "...",
    "statusCode" : 12345,
    "family" : "CLIENT_ERROR"
  },
  "entityType" : {
    "typeName" : "..."
  },
  "status" : 12345,
  "metadata" : {
    "property1" : [ { }, { } ],
    "property2" : [ { }, { } ]
  }
}
                
              

PUT /logger/level/package

Set the package log level example CURL command to update global log level to DEBUG: curl -I -u admin:pass -H "Content-Type: application/json" -X PUT "http://IP:PORT/api/logger/level/package?level=DEBUG&packageToAdjust=com.wandisco"

Request Parameters
name type description
level query String of the level to set e.g. DEBUG
packageToAdjust query The name of the package to have the log level adjusted
Response Codes
code condition
204 No Content - Operation completed successfully
400 Bad Request - see Exception
503 Service Unavailable - unable to get/retrieve LogLevelAdjustor implementation
Response Body
media type data type description
application/json ResponseImpl (JSON) response
application/xml responseImpl (XML)

Example

Request
PUT /logger/level/package
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 204 No Content
Content-Type: application/json

                
{
  "entity" : { },
  "statusType" : {
    "reasonPhrase" : "...",
    "statusCode" : 12345,
    "family" : "OTHER"
  },
  "entityType" : {
    "typeName" : "..."
  },
  "status" : 12345,
  "metadata" : {
    "property1" : [ { }, { } ],
    "property2" : [ { }, { } ]
  }
}
                
              

POST /logger/reset/logger

Reload the log level for a specific package/class. Clear any in-memory customization to the given logger and restore it back to the leve set in the custom configuration file. example CURL command to reset logged named 'com.wandisco': curl -I -u admin:pass -H "Content-Type: application/json" -X POST "http://{host}:{port}/api/logger/reset/logger?logger=com.wandisco"

Request Parameters
name type description
logger query Name of logger to reset.
Response Codes
code condition
204 No Content - Operation completed successfully
503 Service Unavailable - unable to get/retrieve LogLevelAdjustor implementation
Response Body
media type data type description
application/json ResponseImpl (JSON) response
application/xml responseImpl (XML)

Example

Request
POST /logger/reset/logger
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 204 No Content
Content-Type: application/json

                
{
  "entity" : { },
  "statusType" : {
    "reasonPhrase" : "...",
    "statusCode" : 12345,
    "family" : "SERVER_ERROR"
  },
  "entityType" : {
    "typeName" : "..."
  },
  "status" : 12345,
  "metadata" : {
    "property1" : [ { }, { } ],
    "property2" : [ { }, { } ]
  }
}