Legrand / Raritan / Server Technology Xerus™ PDU JSON-RPC API
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
diag::DiagLogSettings Interface Reference

Diagnostic log settings. More...

import"DiagLogSettings.idl";

Classes

struct  LogLevelEntry
 An entry containing a context name and its associated context. More...
 

Public Types

enum  LogLevel {
  LOG_LEVEL_NONE , LOG_LEVEL_ERR , LOG_LEVEL_WARN , LOG_LEVEL_INFO ,
  LOG_LEVEL_DEBUG , LOG_LEVEL_TRACE
}
 Log levels. More...
 

Public Member Functions

void resetLogLevelsForAllCtxNames ()
 Reset log levels of all contexts to default.
 
vector< LogLevelEntrygetLogLevelsForAllCtxNames ()
 Get log levels of all contexts. More...
 
int setLogLevelForAllCtxNames (in LogLevel logLevel)
 Set the log level for all contexts at once. More...
 
int getLogLevelByCtxName (in string ctxName, out LogLevel logLevel)
 Get the log level for a specific context. More...
 
int setLogLevelByCtxName (in string ctxName, in LogLevel logLevel)
 Set the log level for a specific context. More...
 

Public Attributes

constant int ERR_NONE = 0
 no error
 
constant int ERR_UNKNOWN_LOG_CONTEXT_NAME = 1
 unknown log context
 
constant int ERR_UNKNOWN_LOG_LEVEL = 2
 unknown log level
 

Detailed Description

Diagnostic log settings.

Member Enumeration Documentation

◆ LogLevel

Log levels.

Enumerator
LOG_LEVEL_NONE 

no log messages

LOG_LEVEL_ERR 

errors

LOG_LEVEL_WARN 

warnings + errors

LOG_LEVEL_INFO 

info + warnings + errors

LOG_LEVEL_DEBUG 

debug + info + warnings + errors

LOG_LEVEL_TRACE 

trace + debug + info + warnings + errors

Member Function Documentation

◆ getLogLevelByCtxName()

int diag::DiagLogSettings::getLogLevelByCtxName ( in string  ctxName,
out LogLevel  logLevel 
)

Get the log level for a specific context.

Parameters
ctxName- context name
logLevel- result: log level
Returns
ERR_NONE on success
ERR_UNKNOWN_LOG_CONTEXT_NAME if the context is unknown
ERR_UNKNOWN_LOG_LEVEL if log level cannot be mapped to JSON

◆ getLogLevelsForAllCtxNames()

vector<LogLevelEntry> diag::DiagLogSettings::getLogLevelsForAllCtxNames ( )

Get log levels of all contexts.

Returns
vector of LogLevelEntry structures

◆ setLogLevelByCtxName()

int diag::DiagLogSettings::setLogLevelByCtxName ( in string  ctxName,
in LogLevel  logLevel 
)

Set the log level for a specific context.

Parameters
ctxName- context name
logLevel- log level
Returns
ERR_NONE on success
ERR_UNKNOWN_LOG_CONTEXT_NAME if the context is unknown
ERR_UNKNOWN_LOG_LEVEL if log level is unknown

◆ setLogLevelForAllCtxNames()

int diag::DiagLogSettings::setLogLevelForAllCtxNames ( in LogLevel  logLevel)

Set the log level for all contexts at once.

Parameters
logLevel- log level
Returns
ERR_NONE on success
ERR_UNKNOWN_LOG_LEVEL if log level is unknown

The documentation for this interface was generated from the following file: