Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.13.1.2
Data Structures | Macros | Enumerations | Functions
Logging Configuration And Status [OPENAPI_LOGGING]

Data Structures

struct  openapiTrapLogEntry_t
 

Macros

#define OPENAPI_LOG_ENTRY_BUF_SIZE   (OPENAPI_LOG_FORMAT_BUF_SIZE + 80)
 
#define OPENAPI_LOG_FORMAT_BUF_SIZE   512
 
#define OPENAPI_LOG_MAX_PERSISTENT_LOGS   (3)
 
#define OPENAPI_LOG_PERSISTENT_FILE_INDEX_MAX   (2)
 
#define OPENAPI_LOG_PERSISTENT_FILE_INDEX_MIN   (0)
 
#define OPENAPI_TRAP_ENTRY_SIZE   (300)
 
#define OPENAPI_TRAP_LOG_BUF_SIZE   (256 * sizeof(openapiTrapLogEntry_t))
 

Enumerations

enum  OPEN_LOG_SEVERITY_t {
  OPEN_LOG_SEVERITY_UNDEFINED = -1, OPEN_LOG_SEVERITY_EMERGENCY = 0, OPEN_LOG_SEVERITY_ALERT = 1, OPEN_LOG_SEVERITY_CRITICAL = 2,
  OPEN_LOG_SEVERITY_ERROR = 3, OPEN_LOG_SEVERITY_WARNING = 4, OPEN_LOG_SEVERITY_NOTICE = 5, OPEN_LOG_SEVERITY_INFO = 6,
  OPEN_LOG_SEVERITY_DEBUG = 7
}
 OpEN uses this enumeration to define Logging Severity Levels. More...
 
enum  OPEN_MEMORY_BEHAVIOR_t { OPEN_MEMORY_WRAP_BEHAVIOR, OPEN_MEMORY_STOP_ON_FULL_BEHAVIOR }
 
enum  OPEN_USB_LOGGING_MODE_t { OPEN_USB_LOGGING_OVERWRITE_ON_FULL = 1, OPEN_USB_LOGGING_STOP_ON_FULL, OPEN_USB_LOGGING_DISABLE }
 
enum  OPEN_USB_LOGGING_OPER_STATUS_t { OPEN_USB_LOGGING_STATUS_ACTIVE = 1, OPEN_USB_LOGGING_STATUS_INACTIVE }
 

Functions

open_error_t openapiBufferedLogBehaviorGet (openapiClientHandle_t *client_handle, OPEN_MEMORY_BEHAVIOR_t *bufferedLoggingBehavior)
 Get Buffered Behavior. More...
 
open_error_t openapiBufferedLogBehaviorSet (openapiClientHandle_t *client_handle, OPEN_MEMORY_BEHAVIOR_t bufferedLoggingBehavior)
 Set Buffered Behavior. More...
 
open_error_t openapiBufferedLogClear (openapiClientHandle_t *client_handle)
 Clear the content of the buffered messages log. More...
 
open_error_t openapiBufferedLogEntryNextGet (openapiClientHandle_t *client_handle, uint32_t *logIndex, open_buffdesc *logEntry)
 Get the next entry in the in-memory (buffered) message log. More...
 
open_error_t openapiBufferedLogModeGet (openapiClientHandle_t *client_handle, OPEN_CONTROL_t *bufferedLoggingMode)
 Get Buffered logging mode. More...
 
open_error_t openapiBufferedLogModeSet (openapiClientHandle_t *client_handle, OPEN_CONTROL_t bufferedLoggingMode)
 Enable or disable Buffered logging. More...
 
open_error_t openapiBufferedLogNumberOfMessagesGet (openapiClientHandle_t *client_handle, uint32_t *bufferedLoggingNumMessages)
 Get Buffered Number of Messages. More...
 
open_error_t openapiBufferedLogSeverityFilterGet (openapiClientHandle_t *client_handle, OPEN_LOG_SEVERITY_t *bufferedLoggingSeverityFilter)
 Get Buffered Severity Filter. More...
 
open_error_t openapiBufferedLogSeverityFilterSet (openapiClientHandle_t *client_handle, OPEN_LOG_SEVERITY_t bufferedLoggingSeverityFilter)
 Set Buffered Severity Filter. More...
 
open_error_t openapiCliCmdLoggingModeGet (openapiClientHandle_t *client_handle, OPEN_CONTROL_t *cmdLoggingMode)
 Get CLI command logging mode. More...
 
open_error_t openapiCliCmdLoggingModeSet (openapiClientHandle_t *client_handle, OPEN_CONTROL_t cmdLoggingMode)
 Enable or disable CLI command logging. More...
 
open_error_t openapiConsoleLoggingModeGet (openapiClientHandle_t *client_handle, OPEN_CONTROL_t *loggingConsoleMode)
 Get Console Logging mode. More...
 
open_error_t openapiConsoleLoggingModeSet (openapiClientHandle_t *client_handle, OPEN_CONTROL_t loggingConsoleMode)
 Set Console Logging mode. More...
 
open_error_t openapiConsoleLoggingSeverityGet (openapiClientHandle_t *client_handle, OPEN_LOG_SEVERITY_t *severityLevel)
 Get Console Logging severity level. More...
 
open_error_t openapiConsoleLoggingSeveritySet (openapiClientHandle_t *client_handle, OPEN_LOG_SEVERITY_t severityLevel)
 Set Console Logging severity level. More...
 
open_error_t openapiLoggingHostAdd (openapiClientHandle_t *client_handle, open_buffdesc *loggingHost)
 Add a logging host. More...
 
open_error_t openapiLoggingHostIpAddrNextGet (openapiClientHandle_t *client_handle, open_buffdesc *loggingHost)
 Get logging host IP address. More...
 
open_error_t openapiLoggingHostMaxAddrLenGet (openapiClientHandle_t *client_handle, uint32_t *logHostMaxAddrLen)
 Get the maximum length of logging host address. More...
 
open_error_t openapiLoggingHostPortGet (openapiClientHandle_t *client_handle, open_buffdesc *loggingHost, uint16_t *port)
 Get logging host port. More...
 
open_error_t openapiLoggingHostPortSet (openapiClientHandle_t *client_handle, open_buffdesc *loggingHost, uint32_t port)
 Set port number to the logging host. More...
 
open_error_t openapiLoggingHostRemove (openapiClientHandle_t *client_handle, open_buffdesc *loggingHost)
 Remove a logging host entry. More...
 
open_error_t openapiLoggingHostSeverityGet (openapiClientHandle_t *client_handle, open_buffdesc *loggingHost, OPEN_LOG_SEVERITY_t *severityLevel)
 Get logging host severity level. More...
 
open_error_t openapiLoggingHostSeveritySet (openapiClientHandle_t *client_handle, open_buffdesc *loggingHost, OPEN_LOG_SEVERITY_t severityLevel)
 Set severity level to the logging host. More...
 
open_error_t openapiLogPersistentSeverityLevelGet (openapiClientHandle_t *client_handle, OPEN_LOG_SEVERITY_t *pLvl0Sev, OPEN_LOG_SEVERITY_t *pLvl1Sev, OPEN_LOG_SEVERITY_t *pLvl2Sev)
 Get multi log level severity filter of persistent log. More...
 
open_error_t openapiLogPersistentSeverityLevelSet (openapiClientHandle_t *client_handle, OPEN_LOG_SEVERITY_t lvl0Sev, OPEN_LOG_SEVERITY_t lvl1Sev, OPEN_LOG_SEVERITY_t lvl2Sev)
 Set multi log level severity filter of persistent log. More...
 
open_error_t openapiLogSuppressDupLogModeGet (openapiClientHandle_t *client_handle, OPEN_CONTROL_t *mode)
 Get duplicate log suppression mode. More...
 
open_error_t openapiLogSuppressDupLogModeSet (openapiClientHandle_t *client_handle, OPEN_CONTROL_t mode)
 Set duplicate log suppression mode. More...
 
open_error_t openapiLogSuppressDupLogRepeatIntvlGet (openapiClientHandle_t *client_handle, uint32_t *interval)
 Get duplicate log suppression repeat interval. More...
 
open_error_t openapiLogSuppressDupLogRepeatIntvlSet (openapiClientHandle_t *client_handle, uint32_t interval)
 Set duplicate log suppression repeat interval. More...
 
open_error_t openapiLogUsbDeviceNumberGet (openapiClientHandle_t *client_handle, uint32_t *devNumber)
 Get USB logging device number. More...
 
open_error_t openapiLogUsbDeviceNumberSet (openapiClientHandle_t *client_handle, uint32_t devNumber)
 Set USB logging device number. More...
 
open_error_t openapiMaxLoggingHostsSupportedGet (openapiClientHandle_t *client_handle, uint32_t *maxLoggingHosts)
 Get the maximum logging hosts supported. More...
 
open_error_t openapiPersistentLoggingEntryNextGet (openapiClientHandle_t *client_handle, uint32_t fileIndex, uint32_t *logIndex, uint32_t *bufIndex, open_buffdesc *logEntry)
 Get the persistent logging next entry in the file. More...
 
open_error_t openapiPersistentLoggingLogLvlEntryNextGet (openapiClientHandle_t *client_handle, uint32_t fileIndex, uint32_t logLvl, uint32_t index, uint32_t *pBufIndex, open_buffdesc *pLogEntry)
 Get the persistent logging next entry in the file. More...
 
open_error_t openapiPersistentLoggingLogLvlPersistentFileMsgCountGet (openapiClientHandle_t *client_handle, uint32_t fileIndex, uint32_t logLvl, uint32_t *pPersistentLoggingNumMessages)
 Get the persistent logging Number of Messages in the file. More...
 
open_error_t openapiPersistentLoggingModeGet (openapiClientHandle_t *client_handle, OPEN_CONTROL_t *loggingPersistentMode)
 Get the persistent logging mode. More...
 
open_error_t openapiPersistentLoggingModeSet (openapiClientHandle_t *client_handle, OPEN_CONTROL_t persistentLoggingMode)
 Set the persistent logging mode. More...
 
open_error_t openapiPersistentLoggingNumberOfCurrentMessagesGet (openapiClientHandle_t *client_handle, uint32_t *persistentLoggingNumMessages)
 Get the persistent logging Current Number of Messages in the file. More...
 
open_error_t openapiPersistentLoggingNumberOfPreviousMessagesGet (openapiClientHandle_t *client_handle, uint32_t fileIndex, uint32_t *persistentLoggingNumMessages)
 Get the persistent logging Number of Messages in the file. More...
 
open_error_t openapiPersistentLoggingSeverityLevelGet (openapiClientHandle_t *client_handle, OPEN_LOG_SEVERITY_t *severityLevel)
 Get the persistent logging severity level. More...
 
open_error_t openapiPersistentLoggingSeverityLevelSet (openapiClientHandle_t *client_handle, OPEN_LOG_SEVERITY_t severityLevel)
 Set persistent logging severity level. More...
 
open_error_t openapiSysLogModeGet (openapiClientHandle_t *client_handle, OPEN_CONTROL_t *sysLogMode)
 Get syslog mode. More...
 
open_error_t openapiSysLogModeSet (openapiClientHandle_t *client_handle, OPEN_CONTROL_t sysLogMode)
 Set the syslog mode. More...
 
open_error_t openapiSysLogPortGet (openapiClientHandle_t *client_handle, uint16_t *port)
 Get syslog port. More...
 
open_error_t openapiSysLogPortSet (openapiClientHandle_t *client_handle, uint32_t port)
 Set syslog port. More...
 
open_error_t openapiSysLogWrite (openapiClientHandle_t *client_handle, open_buffdesc *logMessage, OPEN_LOG_SEVERITY_t severityLevel)
 Write system log. More...
 
open_error_t openapiTrapLogCapacityGet (openapiClientHandle_t *client_handle, uint32_t *trapsLogsCapacity)
 Get the Trap Logs Capacity. More...
 
open_error_t openapiTrapLogClear (openapiClientHandle_t *client_handle)
 Clear the content of the trap log. More...
 
open_error_t openapiTrapLogGet (openapiClientHandle_t *client_handle, open_buffdesc *trapLogData, uint32_t *numberOfEntries)
 Retrieve the content of the trap log. More...
 
open_error_t openapiTrapLogNumberOfTrapsSinceLastResetGet (openapiClientHandle_t *client_handle, uint32_t *numTrapsSinceLastReset)
 Get the Number of Trap Logs since last reset. More...
 
open_error_t openapiTrapLogNumberOfTrapsSinceLastViewedGet (openapiClientHandle_t *client_handle, uint32_t *numTrapsSinceLastViewed)
 Get the Number of Trap Logs since last viewed. More...
 
open_error_t openapiUsbLoggingModeGet (openapiClientHandle_t *client_handle, OPEN_USB_LOGGING_MODE_t *mode)
 Get USB logging mode. More...
 
open_error_t openapiUsbLoggingModeSet (openapiClientHandle_t *client_handle, OPEN_USB_LOGGING_MODE_t mode)
 Set USB logging mode to enable USB logging. More...
 
open_error_t openapiUsbLoggingOperStatusGet (openapiClientHandle_t *client_handle, OPEN_USB_LOGGING_OPER_STATUS_t *mode)
 Get USB logging operational status. More...
 
open_error_t openapiUsbLoggingSeverityGet (openapiClientHandle_t *client_handle, OPEN_LOG_SEVERITY_t *severity)
 Get USB logging severity. More...
 
open_error_t openapiUsbLoggingSeveritySet (openapiClientHandle_t *client_handle, OPEN_LOG_SEVERITY_t severity)
 Set USB logging severity. More...
 

Detailed Description

Enumeration Type Documentation

OpEN uses this enumeration to define Logging Severity Levels.

Enumerator
OPEN_LOG_SEVERITY_UNDEFINED 

Severity level undefined.

OPEN_LOG_SEVERITY_EMERGENCY 

Emergency conditions.

OPEN_LOG_SEVERITY_ALERT 

Alert conditions.

OPEN_LOG_SEVERITY_CRITICAL 

Critical conditions.

OPEN_LOG_SEVERITY_ERROR 

Error conditions.

OPEN_LOG_SEVERITY_WARNING 

Warning conditions.

OPEN_LOG_SEVERITY_NOTICE 

Normal but significant conditions.

OPEN_LOG_SEVERITY_INFO 

Informational messages.

OPEN_LOG_SEVERITY_DEBUG 

Debug-level messages.

Definition at line 44 of file openapi_logging.h.

Enumerator
OPEN_MEMORY_WRAP_BEHAVIOR 

Buffered logging behavior Wrap on full.

OPEN_MEMORY_STOP_ON_FULL_BEHAVIOR 

Buffered logging behavior Stop on full.

Definition at line 70 of file openapi_logging.h.

Enumerator
OPEN_USB_LOGGING_OVERWRITE_ON_FULL 

Log into USB drive, stop when no space left.

OPEN_USB_LOGGING_STOP_ON_FULL 

Log into USB drive, overwrite when no space left.

OPEN_USB_LOGGING_DISABLE 

Disable USB logging.

Definition at line 57 of file openapi_logging.h.

Enumerator
OPEN_USB_LOGGING_STATUS_ACTIVE 

USB logging operational status Active.

OPEN_USB_LOGGING_STATUS_INACTIVE 

USB logging operational status Inactive.

Definition at line 64 of file openapi_logging.h.

Function Documentation

open_error_t openapiBufferedLogBehaviorGet ( openapiClientHandle_t client_handle,
OPEN_MEMORY_BEHAVIOR_t bufferedLoggingBehavior 
)

Get Buffered Behavior.

Parameters
[in]client_handleClient handle from registration API
[out]bufferedLoggingBehaviorBuffered logging Behavior
Return values
OPEN_E_NONEif Buffered logging mode is returned successfully.
OPEN_E_FAILif invalid mode is returned.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.25

Examples:
logging_example.c.
open_error_t openapiBufferedLogBehaviorSet ( openapiClientHandle_t client_handle,
OPEN_MEMORY_BEHAVIOR_t  bufferedLoggingBehavior 
)

Set Buffered Behavior.

Parameters
[in]client_handleClient handle from registration API
[in]bufferedLoggingBehaviorBuffered logging behavior
Return values
OPEN_E_NONEif Buffered logging behavior is set successfully.
OPEN_E_PARAMif invalid parameter is passed.
Note
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.25

Examples:
logging_example.c.
open_error_t openapiBufferedLogClear ( openapiClientHandle_t client_handle)

Clear the content of the buffered messages log.

Parameters
[in]client_handleClient handle from registration API
Return values
OPEN_E_NONEif operation is successful
OPEN_E_PARAMif invalid parameter is passed
OPEN_E_FAILif operation failed

OpEN API Version: 1.14

Examples:
logging_example.c.
open_error_t openapiBufferedLogEntryNextGet ( openapiClientHandle_t client_handle,
uint32_t *  logIndex,
open_buffdesc logEntry 
)

Get the next entry in the in-memory (buffered) message log.

      Allows for iterating over the content of the message log.
Parameters
[in]client_handleClient handle from registration API
[in,out]logIndexIndex to last retrieved entry. Set to 0 to retrieve latest log entry.
[out]logEntryBuffer to hold log message. Size must be OPENAPI_LOG_ENTRY_BUF_SIZE.
Return values
OPEN_E_NONEif operation is successful
OPEN_E_PARAMif invalid parameter is passed
OPEN_E_NOT_FOUNDif no more log entries are found
OPEN_E_FAILif failure retrieving next log message
Note
The indices are continuously updated as messages are logged. Therefore, a slow reader and a fast writer (lot's of logging) may continuously retrieve the oldest message (which may not be the same). Use a logIndex parameter of 0 to retrieve the latest log message.

OpEN API Version: 1.14

Examples:
logging_example.c.
open_error_t openapiBufferedLogModeGet ( openapiClientHandle_t client_handle,
OPEN_CONTROL_t bufferedLoggingMode 
)

Get Buffered logging mode.

Parameters
[in]client_handleClient handle from registration API
[out]bufferedLoggingModeBuffered logging mode
Return values
OPEN_E_NONEif Buffered logging mode is returned successfully.
OPEN_E_FAILif invalid mode is returned.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.25

Examples:
logging_example.c.
open_error_t openapiBufferedLogModeSet ( openapiClientHandle_t client_handle,
OPEN_CONTROL_t  bufferedLoggingMode 
)

Enable or disable Buffered logging.

Parameters
[in]client_handleClient handle from registration API
[in]bufferedLoggingModeBuffered logging mode
Return values
OPEN_E_NONEif Buffered logging mode is set successfully.
OPEN_E_PARAMif invalid parameter is passed.
Note
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.25

Examples:
logging_example.c.
open_error_t openapiBufferedLogNumberOfMessagesGet ( openapiClientHandle_t client_handle,
uint32_t *  bufferedLoggingNumMessages 
)

Get Buffered Number of Messages.

Parameters
[in]client_handleClient handle from registration API
[out]bufferedLoggingNumMessagesBuffered logging Number of Messages
Return values
OPEN_E_NONEif Buffered logging Number of Messages is returned successfully.
OPEN_E_FAILif invalid mode is returned.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.25

Examples:
logging_example.c.
open_error_t openapiBufferedLogSeverityFilterGet ( openapiClientHandle_t client_handle,
OPEN_LOG_SEVERITY_t bufferedLoggingSeverityFilter 
)

Get Buffered Severity Filter.

Parameters
[in]client_handleClient handle from registration API
[out]bufferedLoggingSeverityFilterBuffered logging Severity Filter
Return values
OPEN_E_NONEif Buffered logging Severity Filter is returned successfully.
OPEN_E_FAILif invalid mode is returned.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.25

Examples:
logging_example.c.
open_error_t openapiBufferedLogSeverityFilterSet ( openapiClientHandle_t client_handle,
OPEN_LOG_SEVERITY_t  bufferedLoggingSeverityFilter 
)

Set Buffered Severity Filter.

Parameters
[in]client_handleClient handle from registration API
[in]bufferedLoggingSeverityFilterBuffered logging Severity Filter
Return values
OPEN_E_NONEif Buffered logging Severity Filter is set successfully.
OPEN_E_PARAMif invalid parameter is passed.
Note
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.25

Examples:
logging_example.c.
open_error_t openapiCliCmdLoggingModeGet ( openapiClientHandle_t client_handle,
OPEN_CONTROL_t cmdLoggingMode 
)

Get CLI command logging mode.

Parameters
[in]client_handleClient handle from registration API
[out]cmdLoggingModeCLI command logging mode
Return values
OPEN_E_NONEif CLI command logging mode is returned successfully.
OPEN_E_FAILif invalid mode is returned.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.1

Examples:
logging_example.c.
open_error_t openapiCliCmdLoggingModeSet ( openapiClientHandle_t client_handle,
OPEN_CONTROL_t  cmdLoggingMode 
)

Enable or disable CLI command logging.

Parameters
[in]client_handleClient handle from registration API
[in]cmdLoggingModeCLI command logging mode
Return values
OPEN_E_NONEif CLI command logging mode is set successfully.
OPEN_E_PARAMif invalid parameter is passed.
Note
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.1

Examples:
logging_example.c.
open_error_t openapiConsoleLoggingModeGet ( openapiClientHandle_t client_handle,
OPEN_CONTROL_t loggingConsoleMode 
)

Get Console Logging mode.

Parameters
[in]client_handleClient handle from registration API
[out]loggingConsoleModeConsole Logging mode
Return values
OPEN_E_NONEif logging console mode is returned successfully.
OPEN_E_FAILif failed to get logging console mode.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.1

Examples:
logging_example.c.
open_error_t openapiConsoleLoggingModeSet ( openapiClientHandle_t client_handle,
OPEN_CONTROL_t  loggingConsoleMode 
)

Set Console Logging mode.

Parameters
[in]client_handleClient handle from registration API
[in]loggingConsoleModeConsole Logging mode
Return values
OPEN_E_NONEif logging console mode is set successfully.
OPEN_E_EXISTSif the same mode is already configured.
OPEN_E_PARAMif invalid parameter is passed.
Note
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.1

Examples:
logging_example.c.
open_error_t openapiConsoleLoggingSeverityGet ( openapiClientHandle_t client_handle,
OPEN_LOG_SEVERITY_t severityLevel 
)

Get Console Logging severity level.

Parameters
[in]client_handleClient handle from registration API
[out]severityLevelConsole Logging severity level
Return values
OPEN_E_NONEif logging console severity level is returned.
OPEN_E_FAILif failed to get logging console severity level.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.1

Examples:
logging_example.c.
open_error_t openapiConsoleLoggingSeveritySet ( openapiClientHandle_t client_handle,
OPEN_LOG_SEVERITY_t  severityLevel 
)

Set Console Logging severity level.

Parameters
[in]client_handleClient handle from registration API
[in]severityLevelConsole Logging severity level
Return values
OPEN_E_NONEif logging console severity level is set successfully.
OPEN_E_FAILif failed to set logging console severity level.
OPEN_E_INTERNALif internal error.
OPEN_E_PARAMif invalid parameter is passed.
Note
Calling this API will change the running configuration of the switch.
To set console logging severity level to default pass 0.

OpEN API Version: 1.1

Examples:
logging_example.c.
open_error_t openapiLoggingHostAdd ( openapiClientHandle_t client_handle,
open_buffdesc loggingHost 
)

Add a logging host.

Parameters
[in]client_handleClient handle from registration API
[in]loggingHostDNS Name/IP address of Logging host
Return values
OPEN_E_NONEif logging host is added.
OPEN_E_EXISTSif host already exists.
OPEN_E_FULLif host table is full.
OPEN_E_PARAMif invalid parameter is passed.
OPEN_E_INTERNALif internal error has occurred.
Note
Calling this API will change the running configuration of the switch.
Maximum size for loggingHost is determined by calling openapiLoggingHostMaxAddrLenGet().
A valid domain name;
(i) Must not contain spaces/dots at the end and beginning.
(ii) Each substring must start with an alphanumeric character.
(iii) Must not contain subsequent dots/spaces.

OpEN API Version: 1.1

Examples:
logging_example.c.
open_error_t openapiLoggingHostIpAddrNextGet ( openapiClientHandle_t client_handle,
open_buffdesc loggingHost 
)

Get logging host IP address.

Parameters
[in]client_handleClient handle from registration API
[in,out]loggingHostDNS Name/IP address of Logging host
Return values
OPEN_E_NONEif logging host IP address is returned.
OPEN_E_FAILif failed to get logging host IP address.
OPEN_E_NOT_FOUNDif no more entries exist.
OPEN_E_PARAMif invalid parameter is passed.
Note
Maximum size for loggingHost is determined by calling openapiLoggingHostMaxAddrLenGet().
To get the first host address pass empty string as host address.

OpEN API Version: 1.1

Examples:
logging_example.c.
open_error_t openapiLoggingHostMaxAddrLenGet ( openapiClientHandle_t client_handle,
uint32_t *  logHostMaxAddrLen 
)

Get the maximum length of logging host address.

Parameters
[in]client_handleClient handle from registration API
[out]logHostMaxAddrLenMaximum length of logging host address
Return values
OPEN_E_NONEif maximum length of logging host address is returned.
OPEN_E_PARAMif invalid parameter is passed.
Note
Host name includes ipv4, ipv6 addresses and DNS name

OpEN API Version: 1.1

Examples:
logging_example.c.
open_error_t openapiLoggingHostPortGet ( openapiClientHandle_t client_handle,
open_buffdesc loggingHost,
uint16_t *  port 
)

Get logging host port.

Parameters
[in]client_handleClient handle from registration API
[in]loggingHostDNS Name/IP address of Logging host
[out]portLogging host port
Return values
OPEN_E_NONEif logging host port is returned.
OPEN_E_NOT_FOUNDif the logging host does not exist.
OPEN_E_PARAMif invalid parameter is passed.
Note
Maximum size for loggingHost is determined by calling openapiLoggingHostMaxAddrLenGet().

OpEN API Version: 1.1

Examples:
logging_example.c.
open_error_t openapiLoggingHostPortSet ( openapiClientHandle_t client_handle,
open_buffdesc loggingHost,
uint32_t  port 
)

Set port number to the logging host.

Parameters
[in]client_handleClient handle from registration API
[in]loggingHostDNS Name/IP address of Logging host
[in]portLogging host port ID
-Minimum value OPENAPI_TCP_UDP_MIN_PORT
-Maximum value OPENAPI_TCP_UDP_MAX_PORT
Return values
OPEN_E_NONEif port number is set to the logging host.
OPEN_E_FAILif failed to set port to the logging host.
OPEN_E_NOT_FOUNDif logging host does not exist.
OPEN_E_PARAMif invalid parameter is passed.
Note
Calling this API will change the running configuration of the switch.
Maximum size for loggingHost is determined by calling openapiLoggingHostMaxAddrLenGet().
To set the logging host port value to default pass 0.

OpEN API Version: 1.1

Examples:
logging_example.c.
open_error_t openapiLoggingHostRemove ( openapiClientHandle_t client_handle,
open_buffdesc loggingHost 
)

Remove a logging host entry.

Parameters
[in]client_handleClient handle from registration API
[in]loggingHostDNS Name/IP address of Logging host
Return values
OPEN_E_NONEif logging host entry is removed.
OPEN_E_FAILif unable to remove the host entry.
OPEN_E_NOT_FOUNDif host name does not exist.
OPEN_E_PARAMif invalid parameter is passed.
Note
Calling this API will change the running configuration of the switch.
Maximum size for loggingHost is determined by calling openapiLoggingHostMaxAddrLenGet().

OpEN API Version: 1.1

Examples:
logging_example.c.
open_error_t openapiLoggingHostSeverityGet ( openapiClientHandle_t client_handle,
open_buffdesc loggingHost,
OPEN_LOG_SEVERITY_t severityLevel 
)

Get logging host severity level.

Parameters
[in]client_handleClient handle from registration API
[in]loggingHostDNS Name/IP address of Logging host
[out]severityLevelLogging host severity
Return values
OPEN_E_NONEif logging host priority is returned.
OPEN_E_NOT_FOUNDif the logging host does not exist.
OPEN_E_PARAMif invalid parameter is passed.
Note
Maximum size for loggingHost is determined by calling openapiLoggingHostMaxAddrLenGet().

OpEN API Version: 1.1

Examples:
logging_example.c.
open_error_t openapiLoggingHostSeveritySet ( openapiClientHandle_t client_handle,
open_buffdesc loggingHost,
OPEN_LOG_SEVERITY_t  severityLevel 
)

Set severity level to the logging host.

Parameters
[in]client_handleClient handle from registration API
[in]loggingHostDNS Name/IP address of Logging host
[in]severityLevelSeverity Level
Return values
OPEN_E_NONEif severity level is set to the logging host.
OPEN_E_FAILif failed to set severity level to the logging host.
OPEN_E_NOT_FOUNDif logging host does not exist.
OPEN_E_PARAMif invalid parameter is passed.
Note
Calling this API will change the running configuration of the switch.
Maximum size for loggingHost is determined by calling openapiLoggingHostMaxAddrLenGet().
To set the severity level to default value pass the enum OPEN_LOG_SEVERITY_UNDEFINED.

OpEN API Version: 1.1

Examples:
logging_example.c.
open_error_t openapiLogPersistentSeverityLevelGet ( openapiClientHandle_t client_handle,
OPEN_LOG_SEVERITY_t pLvl0Sev,
OPEN_LOG_SEVERITY_t pLvl1Sev,
OPEN_LOG_SEVERITY_t pLvl2Sev 
)

Get multi log level severity filter of persistent log.

Parameters
[in]client_handleclient handle from registration API.
[out]pLvl0SevLog level 0 severity filter.
[out]pLvl1SevLog level 1 severity filter.
[out]pLvl2SevLog level 2 severity filter.
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
OPEN_E_UNAVAILif feature is not supported.
Note
This API fetches multi log level severity filter of persistent log.

OpEN API Version: 1.28

Examples:
logging_example.c.
open_error_t openapiLogPersistentSeverityLevelSet ( openapiClientHandle_t client_handle,
OPEN_LOG_SEVERITY_t  lvl0Sev,
OPEN_LOG_SEVERITY_t  lvl1Sev,
OPEN_LOG_SEVERITY_t  lvl2Sev 
)

Set multi log level severity filter of persistent log.

Parameters
[in]client_handleclient handle from registration API.
[in]lvl0SevLog level 0 severity filter.
[in]lvl1SevLog level 1 severity filter.
[in]lvl2SevLog level 2 severity filter.
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
This API sets the multi log level severity filter of persistent log.
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.28

Examples:
logging_example.c.
open_error_t openapiLogSuppressDupLogModeGet ( openapiClientHandle_t client_handle,
OPEN_CONTROL_t mode 
)

Get duplicate log suppression mode.

Parameters
[in]client_handleClient handle from registration API
[out]modeSuppression admin mode
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.25

Examples:
logging_example.c.
open_error_t openapiLogSuppressDupLogModeSet ( openapiClientHandle_t client_handle,
OPEN_CONTROL_t  mode 
)

Set duplicate log suppression mode.

Parameters
[in]client_handleClient handle from registration API
[in]modeSuppression admin mode
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.25

Examples:
logging_example.c.
open_error_t openapiLogSuppressDupLogRepeatIntvlGet ( openapiClientHandle_t client_handle,
uint32_t *  interval 
)

Get duplicate log suppression repeat interval.

Parameters
[in]client_handleClient handle from registration API
[out]intervalRepeat interval value in seconds
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.25

Examples:
logging_example.c.
open_error_t openapiLogSuppressDupLogRepeatIntvlSet ( openapiClientHandle_t client_handle,
uint32_t  interval 
)

Set duplicate log suppression repeat interval.

Parameters
[in]client_handleClient handle from registration API
[in]intervalRepeat interval value in seconds
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.25

Examples:
logging_example.c.
open_error_t openapiLogUsbDeviceNumberGet ( openapiClientHandle_t client_handle,
uint32_t *  devNumber 
)

Get USB logging device number.

Parameters
[in]client_handleClient handle from registration API
[out]devNumberUSB logging device number
Return values
OPEN_E_NONEif operation is successful
OPEN_E_PARAMif invalid parameter is passed
OPEN_E_FAILif operation failed
OPEN_E_UNAVAILif feature is unavailable
Note
OPEN_E_UNAVAIL is returned on platforms that does not support multiple USB devices.

OpEN API Version: 1.26

Examples:
logging_example.c.
open_error_t openapiLogUsbDeviceNumberSet ( openapiClientHandle_t client_handle,
uint32_t  devNumber 
)

Set USB logging device number.

Parameters
[in]client_handleClient handle from registration API
[in]devNumberUSB logging device number
Return values
OPEN_E_NONEif operation is successful
OPEN_E_PARAMif invalid parameter is passed
OPEN_E_FAILif operation failed
OPEN_E_UNAVAILif feature is unavailable
Note
OPEN_E_UNAVAIL is returned on platforms that does not support multiple USB devices.

OpEN API Version: 1.26

Examples:
logging_example.c.
open_error_t openapiMaxLoggingHostsSupportedGet ( openapiClientHandle_t client_handle,
uint32_t *  maxLoggingHosts 
)

Get the maximum logging hosts supported.

Parameters
[in]client_handleClient handle from registration API
[out]maxLoggingHostsMaximum logging hosts supported
Return values
OPEN_E_NONEif maximum logging hosts are returned.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.1

Examples:
logging_example.c.
open_error_t openapiPersistentLoggingEntryNextGet ( openapiClientHandle_t client_handle,
uint32_t  fileIndex,
uint32_t *  logIndex,
uint32_t *  bufIndex,
open_buffdesc logEntry 
)

Get the persistent logging next entry in the file.

Parameters
[in]client_handleClient handle from registration API
[in]fileIndexPersistent file index (valid indexes are 0, 1 and 2).
[in,out]logIndexLog file index
[in,out]bufIndexBuffer index
[out]logEntryPersistent logging entry
Return values
OPEN_E_NONEif persistent logging entry is returned.
OPEN_E_FAILif failed to get persistent logging entry.
OPEN_E_PARAMif invalid parameter is passed.
OPEN_E_UNAVAILif feature is not supported.
Note
use along with openapiPersistentLoggingNumberOfMessagesGet() to loop through the messages
fileIndex 0 is for current logs and 1,2 are for previous logs.

OpEN API Version: 1.25

Examples:
logging_example.c.
open_error_t openapiPersistentLoggingLogLvlEntryNextGet ( openapiClientHandle_t client_handle,
uint32_t  fileIndex,
uint32_t  logLvl,
uint32_t  index,
uint32_t *  pBufIndex,
open_buffdesc pLogEntry 
)

Get the persistent logging next entry in the file.

Parameters
[in]client_handleClient handle from registration API
[in]fileIndexPersistent file index (valid indexes are 0, 1 and 2).
[in]logLvllog level file index. Use 0 for logLvl0 Use 1 for logLvl1 Use 2 for logLvl2
[in]indexLog file index
[out]pBufIndexBuffer index
[out]pLogEntryPersistent logging entry
Return values
OPEN_E_NONEif persistent logging entry is returned.
OPEN_E_FAILif failed to get persistent logging entry.
OPEN_E_PARAMif invalid parameter is passed.
OPEN_E_UNAVAILif feature is not supported.
OPEN_E_NOT_FOUNDif log entry is not found for the given index.
OPEN_E_FULLif next index is greater than total of slog and olog count
Note
use along with openapiPersistentLoggingLogLvlPersistentFileMsgCountGet() to loop through the messages
fileIndex 0 is for current logs and 1,2 are for previous logs.

OpEN API Version: 1.28

Examples:
logging_example.c.
open_error_t openapiPersistentLoggingLogLvlPersistentFileMsgCountGet ( openapiClientHandle_t client_handle,
uint32_t  fileIndex,
uint32_t  logLvl,
uint32_t *  pPersistentLoggingNumMessages 
)

Get the persistent logging Number of Messages in the file.

Parameters
[in]client_handleClient handle from registration API
[in]fileIndexPersistent file index. Use fileIndex 0 for Current messages
[in]logLvllog level file index. Use 0 for logLvl0, Use 1 for logLvl1, Use 2 for logLvl2.
[out]pPersistentLoggingNumMessagesPersistent logging Number of Messages
Return values
OPEN_E_NONEif persistent logging Number of Messages is returned.
OPEN_E_FAILif failed to get persistent logging Number of Messages.
OPEN_E_PARAMif invalid parameter is passed.
OPEN_E_UNAVAILif feature is not supported.
Note
fileIndex 0 is for current logs and 1,2 are for previous logs.

OpEN API Version: 1.28

Examples:
logging_example.c.
open_error_t openapiPersistentLoggingModeGet ( openapiClientHandle_t client_handle,
OPEN_CONTROL_t loggingPersistentMode 
)

Get the persistent logging mode.

Parameters
[in]client_handleClient handle from registration API
[out]loggingPersistentModePersistent Logging admin mode
Return values
OPEN_E_NONEif persistent logging admin mode is returned.
OPEN_E_FAILif failed to get persistent logging mode.
OPEN_E_PARAMif invalid parameter is passed.
OPEN_E_UNAVAILif feature is not supported.

OpEN API Version: 1.1

Examples:
logging_example.c.
open_error_t openapiPersistentLoggingModeSet ( openapiClientHandle_t client_handle,
OPEN_CONTROL_t  persistentLoggingMode 
)

Set the persistent logging mode.

Parameters
[in]client_handleClient handle from registration API
[in]persistentLoggingModePersistent logging mode
Return values
OPEN_E_NONEif persistent logging mode is set.
OPEN_E_EXISTSif the mode is already enabled.
OPEN_E_PARAMif invalid parameter is passed.
OPEN_E_UNAVAILif feature is not supported.
Note
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.1

Examples:
logging_example.c.
open_error_t openapiPersistentLoggingNumberOfCurrentMessagesGet ( openapiClientHandle_t client_handle,
uint32_t *  persistentLoggingNumMessages 
)

Get the persistent logging Current Number of Messages in the file.

Parameters
[in]client_handleClient handle from registration API
[out]persistentLoggingNumMessagesPersistent logging Number of Messages
Return values
OPEN_E_NONEif persistent logging Current Number of Messages is returned.
OPEN_E_FAILif failed to get persistent logging Number of Messages.
OPEN_E_PARAMif invalid parameter is passed.
OPEN_E_UNAVAILif feature is not supported.

OpEN API Version: 1.25

Examples:
logging_example.c.
open_error_t openapiPersistentLoggingNumberOfPreviousMessagesGet ( openapiClientHandle_t client_handle,
uint32_t  fileIndex,
uint32_t *  persistentLoggingNumMessages 
)

Get the persistent logging Number of Messages in the file.

Parameters
[in]client_handleClient handle from registration API
[in]fileIndexPersistent file index. Use fileIndex 0 for Current messages
[out]persistentLoggingNumMessagesPersistent logging Number of Messages
Return values
OPEN_E_NONEif persistent logging Number of Messages is returned.
OPEN_E_FAILif failed to get persistent logging Number of Messages.
OPEN_E_PARAMif invalid parameter is passed.
OPEN_E_UNAVAILif feature is not supported.

OpEN API Version: 1.25

Examples:
logging_example.c.
open_error_t openapiPersistentLoggingSeverityLevelGet ( openapiClientHandle_t client_handle,
OPEN_LOG_SEVERITY_t severityLevel 
)

Get the persistent logging severity level.

Parameters
[in]client_handleClient handle from registration API
[out]severityLevelPersistent logging severity level
Return values
OPEN_E_NONEif persistent logging severity level is returned.
OPEN_E_FAILif failed to get persistent logging severity level.
OPEN_E_PARAMif invalid parameter is passed.
OPEN_E_UNAVAILif feature is not supported.

OpEN API Version: 1.1

Examples:
logging_example.c.
open_error_t openapiPersistentLoggingSeverityLevelSet ( openapiClientHandle_t client_handle,
OPEN_LOG_SEVERITY_t  severityLevel 
)

Set persistent logging severity level.

Parameters
[in]client_handleClient handle from registration API
[in]severityLevelPersistent logging severity level
Return values
OPEN_E_NONEif persistent logging severity level is set.
OPEN_E_FAILif failed to set severity level.
OPEN_E_PARAMif invalid parameter is passed.
OPEN_E_UNAVAILif feature is not supported.
Note
Calling this API will change the running configuration of the switch.
To set the severity level to default value pass OPEN_LOG_SEVERITY_UNDEFINED.

OpEN API Version: 1.1

Examples:
logging_example.c.
open_error_t openapiSysLogModeGet ( openapiClientHandle_t client_handle,
OPEN_CONTROL_t sysLogMode 
)

Get syslog mode.

Parameters
[in]client_handleClient handle from registration API
[out]sysLogModeSyslog mode: enable/disable
Return values
OPEN_E_NONEif syslog status is returned.
OPEN_E_FAILif failed to get syslog status.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.1

Examples:
logging_example.c.
open_error_t openapiSysLogModeSet ( openapiClientHandle_t client_handle,
OPEN_CONTROL_t  sysLogMode 
)

Set the syslog mode.

Parameters
[in]client_handleClient handle from registration API
[in]sysLogModeSyslog mode: enable/disable
Return values
OPEN_E_NONEif syslog status is set.
OPEN_E_EXISTSif the admin mode is already enabled.
OPEN_E_PARAMif invalid parameter is passed.
Note
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.1

Examples:
logging_example.c.
open_error_t openapiSysLogPortGet ( openapiClientHandle_t client_handle,
uint16_t *  port 
)

Get syslog port.

Parameters
[in]client_handleClient handle from registration API
[out]portSyslog port ID
Return values
OPEN_E_NONEif syslog port is returned.
OPEN_E_FAILif failed to get syslog port.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.1

Examples:
logging_example.c.
open_error_t openapiSysLogPortSet ( openapiClientHandle_t client_handle,
uint32_t  port 
)

Set syslog port.

Parameters
[in]client_handleClient handle from registration API
[in]portSyslog port ID
-Minimum value OPENAPI_SYSLOG_MIN_PORT
-Maximum value OPENAPI_SYSLOG_MAX_PORT
Return values
OPEN_E_NONEif syslog port is set.
OPEN_E_EXISTSif the port number is already configured.
OPEN_E_PARAMif invalid parameter is passed.
Note
Calling this API will change the running configuration of the switch.
To set the syslog port value to default pass 0.

OpEN API Version: 1.1

Examples:
logging_example.c.
open_error_t openapiSysLogWrite ( openapiClientHandle_t client_handle,
open_buffdesc logMessage,
OPEN_LOG_SEVERITY_t  severityLevel 
)

Write system log.

Parameters
[in]client_handleClient handle from registration API
[in]logMessageLog message
-Maximum length OPENAPI_LOG_FORMAT_BUF_SIZE
[in]severityLevelLogging severity level
Return values
OPEN_E_NONEif operation is successful
OPEN_E_PARAMif invalid parameter is passed.
OPEN_E_ERRORif input log message contains single symbol ''. To print percent symbol in message - double percent must be used. For ex. message "%%s" will be printed as "%s".

OpEN API Version: 1.8

open_error_t openapiTrapLogCapacityGet ( openapiClientHandle_t client_handle,
uint32_t *  trapsLogsCapacity 
)

Get the Trap Logs Capacity.

Parameters
[in]client_handleClient handle from registration API
[out]trapsLogsCapacityNumber of Trap Logs Capacity
Return values
OPEN_E_NONEif Trap Logs Capacity is returned.
OPEN_E_FAILif failed to get Trap Logs Capacity.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.25

Examples:
logging_example.c.
open_error_t openapiTrapLogClear ( openapiClientHandle_t client_handle)

Clear the content of the trap log.

Parameters
[in]client_handleClient handle from registration API
Return values
OPEN_E_NONEif operation is successful
OPEN_E_PARAMif invalid parameter is passed
OPEN_E_FAILif operation failed

OpEN API Version: 1.14

Examples:
logging_example.c.
open_error_t openapiTrapLogGet ( openapiClientHandle_t client_handle,
open_buffdesc trapLogData,
uint32_t *  numberOfEntries 
)

Retrieve the content of the trap log.

Returns all entries present as an array of openapiTrapLogEntry_t.

Parameters
[in]client_handleClient handle from registration API
[out]trapLogDataBuffer to hold log message. Size must be OPENAPI_TRAP_LOG_BUF_SIZE.
[out]numberOfEntriesThe number of trap log entries returned,
Return values
OPEN_E_NONEif operation is successful
OPEN_E_PARAMif invalid parameter is passed

OpEN API Version: 1.14

Examples:
logging_example.c.
open_error_t openapiTrapLogNumberOfTrapsSinceLastResetGet ( openapiClientHandle_t client_handle,
uint32_t *  numTrapsSinceLastReset 
)

Get the Number of Trap Logs since last reset.

Parameters
[in]client_handleClient handle from registration API
[out]numTrapsSinceLastResetNumber of Trap Logs since last reset
Return values
OPEN_E_NONEif Number of Trap Logs since last reset is returned.
OPEN_E_FAILif failed to get Number of Trap Logs since last reset.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.25

Examples:
logging_example.c.
open_error_t openapiTrapLogNumberOfTrapsSinceLastViewedGet ( openapiClientHandle_t client_handle,
uint32_t *  numTrapsSinceLastViewed 
)

Get the Number of Trap Logs since last viewed.

Parameters
[in]client_handleClient handle from registration API
[out]numTrapsSinceLastViewedNumber of Trap Logs since last viewed
Return values
OPEN_E_NONEif Number of Trap Logs since last viewed is returned.
OPEN_E_FAILif failed to get Number of Trap Logs since last viewed.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.25

Examples:
logging_example.c.
open_error_t openapiUsbLoggingModeGet ( openapiClientHandle_t client_handle,
OPEN_USB_LOGGING_MODE_t mode 
)

Get USB logging mode.

Parameters
[in]client_handleClient handle from registration API
[out]modeUSB logging mode
Return values
OPEN_E_NONEif operation is successful
OPEN_E_PARAMif invalid parameter is passed
OPEN_E_FAILif operation failed
OPEN_E_UNAVAILif feature is unavailable

OpEN API Version: 1.23

Examples:
logging_example.c.
open_error_t openapiUsbLoggingModeSet ( openapiClientHandle_t client_handle,
OPEN_USB_LOGGING_MODE_t  mode 
)

Set USB logging mode to enable USB logging.

Parameters
[in]client_handleClient handle from registration API
[in]modeUSB logging mode
Return values
OPEN_E_NONEif operation is successful
OPEN_E_PARAMif invalid parameter is passed
OPEN_E_FAILif operation failed
OPEN_E_UNAVAILif feature is unavailable

OpEN API Version: 1.23

Examples:
logging_example.c.
open_error_t openapiUsbLoggingOperStatusGet ( openapiClientHandle_t client_handle,
OPEN_USB_LOGGING_OPER_STATUS_t mode 
)

Get USB logging operational status.

Parameters
[in]client_handleClient handle from registration API
[out]modeUSB logging operational status
Return values
OPEN_E_NONEif operation is successful
OPEN_E_PARAMif invalid parameter is passed
OPEN_E_FAILif operation failed
OPEN_E_UNAVAILif feature is unavailable

OpEN API Version: 1.23

Examples:
logging_example.c.
open_error_t openapiUsbLoggingSeverityGet ( openapiClientHandle_t client_handle,
OPEN_LOG_SEVERITY_t severity 
)

Get USB logging severity.

Parameters
[in]client_handleClient handle from registration API
[out]severityUSB logging mode
Return values
OPEN_E_NONEif operation is successful
OPEN_E_PARAMif invalid parameter is passed
OPEN_E_FAILif operation failed
OPEN_E_UNAVAILif feature is unavailable

OpEN API Version: 1.23

Examples:
logging_example.c.
open_error_t openapiUsbLoggingSeveritySet ( openapiClientHandle_t client_handle,
OPEN_LOG_SEVERITY_t  severity 
)

Set USB logging severity.

Parameters
[in]client_handleClient handle from registration API
[in]severityUSB logging mode
Return values
OPEN_E_NONEif operation is successful
OPEN_E_PARAMif invalid parameter is passed
OPEN_E_FAILif operation failed
OPEN_E_UNAVAILif feature is unavailable

OpEN API Version: 1.23

Examples:
logging_example.c.