Umbra::Logger class

Logger interface.

The Umbra Optimizer module provides useful information on the progress and potential issues though the Logger interface. When no user implementation is provided, a default implementation that formats the log messages into STDOUT is used.

When contacting Umbra support with issues related to the use of the Umbra Optimizer it is a good idea to include a full log of the computation.

Public types

enum Level { LEVEL_DEBUG = 0, LEVEL_INFO = 1, LEVEL_WARNING = 2, LEVEL_ERROR = 3 }
Class of log message.

Constructors, destructors, conversion operators

~Logger(void) virtual

Public functions

void log(Level level, const char* str) pure virtual
The single line log message callback.

Enum details

enum Umbra::Logger::Level

Class of log message.

Enumerators
LEVEL_DEBUG

A debug message, generally only used for Umbra development purposes.

LEVEL_INFO

An informational log message.

LEVEL_WARNING

A warning message for highlighting issues in the input or otherwise suboptimal operation.

A warning message is always non-fatal and does not result in wrong behavior, but can provide useful clues for improving the computation performance and/or output quality

LEVEL_ERROR

A detailed description of a fatal error.

Generally when an error message is logged the API call causing it will return with an error code.

Function details

void Umbra::Logger::log(Level level, const char* str) pure virtual

The single line log message callback.

Parameters
level The class of the log message
str The log message string, as zero-terminated ascii with no newline character at the end

Implement this function to display or store log messages as appropriate in your system. The level of the message can be used to filter and/or highlight messages based on the class.