WPILibC++ 2023.4.3
Logger Functions

Functions

NT_Listener NT_AddLogger (NT_Inst inst, unsigned int min_level, unsigned int max_level, void *data, NT_ListenerCallback func)
 Add logger callback function. More...
 
NT_Listener NT_AddPolledLogger (NT_ListenerPoller poller, unsigned int min_level, unsigned int max_level)
 Set the log level for a listener poller. More...
 

Detailed Description

Function Documentation

◆ NT_AddLogger()

NT_Listener NT_AddLogger ( NT_Inst  inst,
unsigned int  min_level,
unsigned int  max_level,
void *  data,
NT_ListenerCallback  func 
)

Add logger callback function.

By default, log messages are sent to stderr; this function sends log messages to the provided callback function instead. The callback function will only be called for log messages with level greater than or equal to min_level and less than or equal to max_level; messages outside this range will be silently ignored.

Parameters
instinstance handle
min_levelminimum log level
max_levelmaximum log level
datadata pointer to pass to func
funclistener callback function
Returns
Listener handle

◆ NT_AddPolledLogger()

NT_Listener NT_AddPolledLogger ( NT_ListenerPoller  poller,
unsigned int  min_level,
unsigned int  max_level 
)

Set the log level for a listener poller.

Events will only be generated for log messages with level greater than or equal to min_level and less than or equal to max_level; messages outside this range will be silently ignored.

Parameters
pollerpoller handle
min_levelminimum log level
max_levelmaximum log level
Returns
Listener handle