WPILibC++ 2025.2.1
Loading...
Searching...
No Matches
Logger Functions

Functions

NT_Listener nt::AddLogger (NT_Inst inst, unsigned int min_level, unsigned int max_level, ListenerCallback func)
 Add logger callback function.
 
NT_Listener nt::AddPolledLogger (NT_ListenerPoller poller, unsigned int min_level, unsigned int max_level)
 Set the log level for a log poller.
 

Detailed Description

Function Documentation

◆ AddLogger()

NT_Listener nt::AddLogger ( NT_Inst inst,
unsigned int min_level,
unsigned int max_level,
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
funclistener callback function
Returns
Listener handle

◆ AddPolledLogger()

NT_Listener nt::AddPolledLogger ( NT_ListenerPoller poller,
unsigned int min_level,
unsigned int max_level )

Set the log level for a log 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
Logger handle