neuray API Programmer's Manual

Logging

[Base API]

Description

Logger interface and severity levels.

Include File:

#include <mi/base/ilogger.h>

Namespaces

namespace 
Namespace for details of the Base API. More...
namespace mi::base::msg

Classes

class 
The ILogger interface class supports logging of messages. More...
class 
Adapts mi::base::ILogger to a standard streaming interface. More...
struct 
Structured details to log messages. More...

Enumerations

enum mi::base::details::Message_severity{ MESSAGE_SEVERITY_FATAL = 0, MESSAGE_SEVERITY_ERROR = 1, MESSAGE_SEVERITY_WARNING = 2, MESSAGE_SEVERITY_INFO = 3, MESSAGE_SEVERITY_VERBOSE = 4, MESSAGE_SEVERITY_DEBUG = 5, MESSAGE_SEVERITY_FORCE_32_BIT = 0xffffffffU}
Constants for possible message severities. More...

Functions

template< typename C, typename T> std::​basic_ostream < C , T >& mi::base::debug( std::​basic_ostream < C , T >& ostream)
Manipulator for mi::base::Log_stream. More...
template< typename C, typename T> std::​basic_ostream < C , T >& mi::base::error( std::​basic_ostream < C , T >& ostream)
Manipulator for mi::base::Log_stream. More...
template< typename C, typename T> std::​basic_ostream < C , T >& mi::base::fatal( std::​basic_ostream < C , T >& ostream)
Manipulator for mi::base::Log_stream. More...
template< typename C, typename T> std::​basic_ostream < C , T >& mi::base::info( std::​basic_ostream < C , T >& ostream)
Manipulator for mi::base::Log_stream. More...
template< typename C, typename T> std::​basic_ostream < C , T >& mi::base::operator<<( std::​basic_ostream < C , T >& ostream, const Message_details& md)
Manipulator for mi::base::Log_stream. More...
template< typename C, typename T> std::​basic_ostream < C , T >& mi::base::verbose( std::​basic_ostream < C , T >& ostream)
Manipulator for mi::base::Log_stream. More...
template< typename C, typename T> std::​basic_ostream < C , T >& mi::base::warning( std::​basic_ostream < C , T >& ostream)
Manipulator for mi::base::Log_stream. More...

Enums

enum mi::base::details::Message_severity

Constants for possible message severities.

See also:

mi::base::ILogger::message()

Enumerator:

MESSAGE_SEVERITY_FATAL = 0
A fatal error has occurred.
MESSAGE_SEVERITY_ERROR = 1
An error has occurred.
MESSAGE_SEVERITY_WARNING = 2
A warning has occurred.
MESSAGE_SEVERITY_INFO = 3
This is a normal operational message.
MESSAGE_SEVERITY_VERBOSE = 4
This is a more verbose message.
MESSAGE_SEVERITY_DEBUG = 5
This is debug message.
MESSAGE_SEVERITY_FORCE_32_BIT = 0xffffffffU

Functions

template< typename C, typename T>

std::​basic_ostream < C , T >& mi::base::debug( std::​basic_ostream < C , T >& ostream) [inline]

Manipulator for mi::base::Log_stream. Flushes the buffer if not empty, and sets the log level of the next message to mi::base::details::MESSAGE_SEVERITY_DEBUG.

Note:

If you are using a C++ standard older than C++14, make sure to use the manipulator only if the stream is an instance of mi::base::Log_stream, otherwise your program will crash. With C++14 and later, these manipulators will be ignored if the stream is not an instance of mi::base::Log_stream.

template< typename C, typename T>

std::​basic_ostream < C , T >& mi::base::error( std::​basic_ostream < C , T >& ostream) [inline]

Manipulator for mi::base::Log_stream. Flushes the buffer if not empty, and sets the log level of the next message to mi::base::details::MESSAGE_SEVERITY_ERROR.

Note:

If you are using a C++ standard older than C++14, make sure to use the manipulator only if the stream is an instance of mi::base::Log_stream, otherwise your program will crash. With C++14 and later, these manipulators will be ignored if the stream is not an instance of mi::base::Log_stream.

template< typename C, typename T>

std::​basic_ostream < C , T >& mi::base::fatal( std::​basic_ostream < C , T >& ostream) [inline]

Manipulator for mi::base::Log_stream. Flushes the buffer if not empty, and sets the log level of the next message to mi::base::details::MESSAGE_SEVERITY_FATAL.

Note:

If you are using a C++ standard older than C++14, make sure to use the manipulator only if the stream is an instance of mi::base::Log_stream, otherwise your program will crash. With C++14 and later, these manipulators will be ignored if the stream is not an instance of mi::base::Log_stream.

template< typename C, typename T>

std::​basic_ostream < C , T >& mi::base::info( std::​basic_ostream < C , T >& ostream) [inline]

Manipulator for mi::base::Log_stream. Flushes the buffer if not empty, and sets the log level of the next message to mi::base::details::MESSAGE_SEVERITY_INFO.

Note:

If you are using a C++ standard older than C++14, make sure to use the manipulator only if the stream is an instance of mi::base::Log_stream, otherwise your program will crash. With C++14 and later, these manipulators will be ignored if the stream is not an instance of mi::base::Log_stream.

template< typename C, typename T>

std::​basic_ostream < C , T >& mi::base::operator<<( std::​basic_ostream < C , T >& ostream, const Message_details& md) [inline]

Manipulator for mi::base::Log_stream. Flushes the buffer if not empty, and sets the log details of the next message.

Note:

If you are using a C++ standard older than C++14, make sure to use the manipulator only if the stream is an instance of mi::base::Log_stream, otherwise your program will crash. With C++14 and later, these manipulators will be ignored if the stream is not an instance of mi::base::Log_stream.

template< typename C, typename T>

std::​basic_ostream < C , T >& mi::base::verbose( std::​basic_ostream < C , T >& ostream) [inline]

Manipulator for mi::base::Log_stream. Flushes the buffer if not empty, and sets the log level of the next message to mi::base::details::MESSAGE_SEVERITY_VERBOSE.

Note:

If you are using a C++ standard older than C++14, make sure to use the manipulator only if the stream is an instance of mi::base::Log_stream, otherwise your program will crash. With C++14 and later, these manipulators will be ignored if the stream is not an instance of mi::base::Log_stream.

template< typename C, typename T>

std::​basic_ostream < C , T >& mi::base::warning( std::​basic_ostream < C , T >& ostream) [inline]

Manipulator for mi::base::Log_stream. Flushes the buffer if not empty, and sets the log level of the next message to mi::base::details::MESSAGE_SEVERITY_WARNING.

Note:

If you are using a C++ standard older than C++14, make sure to use the manipulator only if the stream is an instance of mi::base::Log_stream, otherwise your program will crash. With C++14 and later, these manipulators will be ignored if the stream is not an instance of mi::base::Log_stream.