HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
onnxruntime::logging::Logger Class Reference

#include <logging.h>

Public Member Functions

 Logger (const LoggingManager &loggingManager, std::string id, Severity severity, bool filter_user_data, int vlog_level)
 
Severity GetSeverity () const noexcept
 
void SetSeverity (Severity severity) noexcept
 
void SetVerbosity (int vlog_level) noexcept
 
bool OutputIsEnabled (Severity severity, DataType data_type) const noexcept
 
int VLOGMaxLevel () const noexcept
 
void Log (const Capture &message) const
 
void SendProfileEvent (profiling::EventRecord &eventRecord) const
 

Detailed Description

Logger provides a per-instance log id. Everything else is passed back up to the LoggingManager

Definition at line 225 of file logging.h.

Constructor & Destructor Documentation

onnxruntime::logging::Logger::Logger ( const LoggingManager loggingManager,
std::string  id,
Severity  severity,
bool  filter_user_data,
int  vlog_level 
)
inline

Initializes a new instance of the Logger class.

Parameters
loggingManagerThe logging manager.
idThe identifier for messages coming from this Logger.
severityMinimum severity for messages to be created and logged.
filter_user_dataShould USER data be filtered from output.
vlog_levelMinimum level for VLOG messages to be created. Note that a severity of kVERBOSE must be provided for VLOG messages to be logged.

Definition at line 236 of file logging.h.

Member Function Documentation

Severity onnxruntime::logging::Logger::GetSeverity ( ) const
inlinenoexcept

Get the minimum severity level for log messages to be output.

Returns
The severity.

Definition at line 249 of file logging.h.

void onnxruntime::logging::Logger::Log ( const Capture message) const
inline

Logs the captured message.

Parameters
messageThe log message.

Definition at line 286 of file logging.h.

bool onnxruntime::logging::Logger::OutputIsEnabled ( Severity  severity,
DataType  data_type 
) const
inlinenoexcept

Check if output is enabled for the provided LogSeverity and DataType values.

Parameters
severityThe severity.
data_typeType of the data.
Returns
True if a message with these values will be logged.

Definition at line 271 of file logging.h.

void onnxruntime::logging::Logger::SendProfileEvent ( profiling::EventRecord eventRecord) const
inline

Sends a Profiling Event Record to the sink.

Parameters
ProfilingEvent Record

Definition at line 294 of file logging.h.

void onnxruntime::logging::Logger::SetSeverity ( Severity  severity)
inlinenoexcept

Change the minimum severity level for log messages to be output.

Parameters
severityThe severity.

Definition at line 255 of file logging.h.

void onnxruntime::logging::Logger::SetVerbosity ( int  vlog_level)
inlinenoexcept

Change the maximum verbosity level for log messages to be output.

Remarks
To activate the verbose log, the logger severity must also be set to kVERBOSE.
Parameters
vlog_levelThe verbosity.

Definition at line 263 of file logging.h.

int onnxruntime::logging::Logger::VLOGMaxLevel ( ) const
inlinenoexcept

Return the maximum VLOG level allowed. Disabled unless logging VLOG messages

Definition at line 278 of file logging.h.


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