NVIDIA NvNeural SDK
2022.2
GPU inference framework for NVIDIA Nsight Deep Learning Designer
|
SimpleLogger is a basic ILogger implementation that displays to stdout. More...
#include <SimpleLogger.h>
Public Member Functions | |
nvneural::NeuralResult | log (VerbosityLevel verbosity, const char *format,...) noexcept final |
Logs an informational message. More... | |
nvneural::NeuralResult | logError (VerbosityLevel verbosity, const char *format,...) noexcept final |
Logs an error message. More... | |
nvneural::NeuralResult | logWarning (VerbosityLevel verbosity, const char *format,...) noexcept final |
Logs a warning message. More... | |
void | redirectAllOutput (std::ostream &destination) |
Redirects future logger output to a new C++ ostream object. More... | |
void | setVerbosity (VerbosityLevel verbosity) |
Sets the new verbosity threshold for the logger. More... | |
SimpleLogger (VerbosityLevel verbosity) | |
Creates a SimpleLogger with a default verbosity level. More... | |
VerbosityLevel | verbosity () const noexcept final |
Retrieves the current verbosity level. More... | |
![]() | |
IRefObject::RefCount | addRef () const noexcept |
Increment the object's reference count. More... | |
const void * | queryInterface (IRefObject::TypeId interfaceId) const noexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
void * | queryInterface (IRefObject::TypeId interfaceId) noexcept |
Retrieves a new object interface pointer. More... | |
RefObjectBase () | |
Default constructor. Logs object creation. | |
IRefObject::RefCount | release () const noexcept |
Decrements the object's reference count and destroys the object if the reference count reaches zero. More... | |
SimpleLogger is a basic ILogger implementation that displays to stdout.
Logs are sent unaltered, warnings are prefixed with "WRN: ", and errors are prefixed with "ERR: ". ConverenceNG uses SimpleLogger for the majority of its command-line output.
|
explicit |
Creates a SimpleLogger with a default verbosity level.
verbosity | Default verbosity level to assign |
|
finalnoexcept |
Logs an informational message.
verbosity | Verbosity level of the message. |
format | Printf-style format string. |
|
finalnoexcept |
Logs an error message.
Error messages indicate a serious failure has occurred and the user's workflow must stop. Recoverable or expected failures should probably be warnings, not errors.
Under normal conditions, plugins should not emit error messages at verbosity level 0.
Error messages do not necessarily have to be fatal errors and result in application exit; a failure to export a model because of insufficient disk space is a legitimate error message but would not require the model editor to exit.
verbosity | Verbosity level of the message. |
format | Printf-style format string. |
|
finalnoexcept |
Logs a warning message.
Warning messages indicate transient failures that the user should be aware of, but which did not result in failure of a major operation.
Under normal conditions, plugins should not emit warning messages at verbosity level 0.
verbosity | Verbosity level of the message. |
format | Printf-style format string. |
void SimpleLogger::redirectAllOutput | ( | std::ostream & | destination | ) |
Redirects future logger output to a new C++ ostream object.
This method is not ABI-stable. Do not call it except from the same module that created the SimpleLogger object; other libraries might not have a compatible layout for their ostream objects.
destination | New destination for log messages |
void SimpleLogger::setVerbosity | ( | VerbosityLevel | verbosity | ) |
Sets the new verbosity threshold for the logger.
Logs whose verbosity levels exceed the threshold are silently ignored.
verbosity | New verbosity level to assign |
|
finalnoexcept |
Retrieves the current verbosity level.