Operational Insights Logging REST API (3.0)

Download OpenAPI specification:

This API enables you to view and modify the log levels of individual Operational Insights loggers at runtime, without restarting the service.

Changes made through this API are applied immediately, broadcast to all active nodes in the cluster, and persisted so that they survive node restarts. They override the default log level configured by the logLevel service-level parameter (see the Configuration REST API) for the affected loggers.

The root logger cannot be modified through this API.

View Configured Loggers

Returns the loggers that have been explicitly configured (i.e., whose level differs from that of their parent logger), along with their current levels.

Authorizations:
AnalyticsManage

Responses

Response samples

Content type
application/json
{
  • "loggers": [
    ]
}

Modify Logger Levels

Sets the log level for one or more loggers. Any logger included in the request that does not yet exist is created. The root logger (empty name) cannot be modified.

Authorizations:
AnalyticsManage
Request Body schema: application/json
required
required
Array of objects

The list of loggers and their levels.

Responses

Request samples

Content type
application/json
{
  • "loggers": [
    ]
}

Response samples

Content type
application/json
{
  • "error": "string"
}

Reset All Loggers

Restores all loggers to their default configuration, discarding any levels previously set through this API. The default level is determined by the logLevel service-level parameter.

Authorizations:
AnalyticsManage

Responses

Response samples

Content type
application/json
{ }

List Available Loggers

Returns the names of all known loggers, one per line, as plain text.

Authorizations:
AnalyticsManage

Responses

Response samples

Content type
text/plain
org.apache.hyracks
org.apache.asterix
com.couchbase.analytics

View Logger Level

Returns the current effective log level of the specified logger, as plain text.

Authorizations:
AnalyticsManage
path Parameters
logger
required
string
Example: com.couchbase.analytics

The name of the logger.

Responses

Response samples

Content type
application/json
{
  • "error": "string"
}

Modify Logger Level

Sets the log level for the specified logger, creating it if it does not yet exist. The root logger cannot be modified.

Authorizations:
AnalyticsManage
path Parameters
logger
required
string
Example: com.couchbase.analytics

The name of the logger.

Request Body schema: text/plain
required
string

A log level. Common values, from least to most verbose, are: OFF, FATAL, ERROR, WARN, INFO, DEBUG, TRACE, ALL.

Responses

Response samples

Content type
application/json
{
  • "error": "string"
}

Reset Logger Level

Removes the level previously set for the specified logger through this API, so that it reverts to inheriting its level from its parent logger. The root logger cannot be modified.

Authorizations:
AnalyticsManage
path Parameters
logger
required
string
Example: com.couchbase.analytics

The name of the logger.

Responses

Response samples

Content type
application/json
{
  • "error": "string"
}