You’re reading an older version of the Slamcore SDK documenation. The latest one is 23.04.

File logging.hpp

Slamcore logging.

Helper functions for slamcore::LogSeverity

template<class Archive>
static inline void load_minimal(const Archive&, LogSeverity &obj, const std::string &value)
template<class Archive>
static inline std::string save_minimal(const Archive&, const LogSeverity &obj)
static inline std::ostream &operator<<(std::ostream &os, const LogSeverity obj)

Typedefs

using LogCallbackT = std::function<void(const LogMessageInterface&)>

Log callback signature.

Enums

enum class LogSeverity : EnumBaseT

Slamcore log severity levels

Values:

enumerator Info
enumerator Warning
enumerator Error
enumerator Fatal
enumerator Count
namespace slamcore

Main namespace for the Slamcore public API

Helper functions for slamcore::LogSeverity

template<class Archive>
static inline void load_minimal(const Archive&, LogSeverity &obj, const std::string &value)
template<class Archive>
static inline std::string save_minimal(const Archive&, const LogSeverity &obj)
static inline std::ostream &operator<<(std::ostream &os, const LogSeverity obj)

Helper conversion methods

slamcore::ImageFormat \(\leftrightarrow\) BytesPerChannel

Get information about the client library

Typedefs

using LogCallbackT = std::function<void(const LogMessageInterface&)>

Log callback signature.

Enums

enum class LogSeverity : EnumBaseT

Slamcore log severity levels

Values:

enumerator Info
enumerator Warning
enumerator Error
enumerator Fatal
enumerator Count
class LogMessageInterface
#include <logging.hpp>

Interface to a log message

Public Functions

virtual ~LogMessageInterface() = default
virtual LogSeverity getSeverity() const = 0

Return the log message severity

virtual host_timestamp getTimestamp() const = 0

Return the log message timestamp

virtual const std::string &getMessage() const = 0

Returns the log message content