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

#include <capture.h>

Public Member Functions

 Capture (const Logger &logger, logging::Severity severity, const char *category, logging::DataType dataType, const CodeLocation &location)
 
std::ostream & Stream () noexcept
 
void CapturePrintf (msvc_printf_check const char *format,...) __attribute__((format(printf
 
void void ProcessPrintf (msvc_printf_check const char *format, va_list args)
 
logging::Severity Severity () const noexcept
 
char SeverityPrefix () const noexcept
 
const char * Category () const noexcept
 
logging::DataType DataType () const noexcept
 
const CodeLocationLocation () const noexcept
 
std::string Message () const noexcept
 
 ~Capture ()
 

Detailed Description

Class to capture the details of a log message.

Definition at line 21 of file capture.h.

Constructor & Destructor Documentation

onnxruntime::logging::Capture::Capture ( const Logger logger,
logging::Severity  severity,
const char *  category,
logging::DataType  dataType,
const CodeLocation location 
)
inline

Initializes a new instance of the Capture class.

Parameters
loggerThe logger.
severityThe severity.
categoryThe category.
dataTypeType of the data.
locationThe file location the log message is coming from.

Definition at line 31 of file capture.h.

onnxruntime::logging::Capture::~Capture ( )

Member Function Documentation

void onnxruntime::logging::Capture::CapturePrintf ( msvc_printf_check const char *  format,
  ... 
)

Captures a printf style log message.

Parameters
name="format">Theprintf format.
name="">Argumentsto the printf format if needed.
Remarks
A maximum of 2K of output will be captured currently. Non-static method, so 'this' is implicit first arg, and we use format(printf(2,3)
const char* onnxruntime::logging::Capture::Category ( ) const
inlinenoexcept

Definition at line 85 of file capture.h.

logging::DataType onnxruntime::logging::Capture::DataType ( ) const
inlinenoexcept

Definition at line 89 of file capture.h.

const CodeLocation& onnxruntime::logging::Capture::Location ( ) const
inlinenoexcept

Definition at line 93 of file capture.h.

std::string onnxruntime::logging::Capture::Message ( ) const
inlinenoexcept

Definition at line 97 of file capture.h.

void void onnxruntime::logging::Capture::ProcessPrintf ( msvc_printf_check const char *  format,
va_list  args 
)

Process a printf style log message.

Parameters
formatThe printf format.
...Arguments to the printf format if needed.
Remarks
A maximum of 2K of output will be captured currently. Note: As va_list is 'char *', we have to disambiguate this from CapturePrintf so that something like "One string: %s", "the string" does not consider "the string" to be the va_list.
logging::Severity onnxruntime::logging::Capture::Severity ( ) const
inlinenoexcept

Definition at line 74 of file capture.h.

char onnxruntime::logging::Capture::SeverityPrefix ( ) const
inlinenoexcept

Definition at line 78 of file capture.h.

std::ostream& onnxruntime::logging::Capture::Stream ( )
inlinenoexcept

The stream that can capture the message via operator<<.

Returns
Output stream.

Definition at line 40 of file capture.h.


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