Core-tel module

Files

file level.hpp
Telemetry levels.
file logging.hpp
Logging and assertion macros.
file metrics.hpp
Metrics and profiling utilities and macros.
file tracing.hpp
Tracing macros.

Classes

class cubos::core::tel::Logger
Singleton which holds the logging state.

Enums

enum class Level { Trace = CUBOS_TEL_LEVEL_TRACE, Debug = CUBOS_TEL_LEVEL_DEBUG, Info = CUBOS_TEL_LEVEL_INFO, Warn = CUBOS_TEL_LEVEL_WARN, Error = CUBOS_TEL_LEVEL_ERROR, Critical = CUBOS_TEL_LEVEL_CRITICAL, Off = CUBOS_TEL_LEVEL_OFF }
Represents a telemetry level.

Functions

void level(Level level)
Set telemetry level.
auto level() -> Level -> auto
Get telemetry level.

Defines

#define CUBOS_TEL_LEVEL_TRACE
Trace telemetry level, lowest telemetry level. Very verbose.
#define CUBOS_TEL_LEVEL_DEBUG
Debug telemetry level. Contains logs and tracing useful for debugging, but which are not necessary in release builds.
#define CUBOS_TEL_LEVEL_INFO
Information telemetry level. Contains important events that are not errors.
#define CUBOS_TEL_LEVEL_WARN
Warn telemetry level. Contains events that are not errors, but which are unexpected and may be problematic.
#define CUBOS_TEL_LEVEL_ERROR
Error telemetry level. Contains errors which are recoverable from.
#define CUBOS_TEL_LEVEL_CRITICAL
Critical telemetry level, highest log level. Contains errors which are unrecoverable from.
#define CUBOS_TEL_LEVEL_OFF
Off telemetry level, disables all logging/tracing.
#define CUBOS_TEL_LEVEL
Telemetry level to compile in.
#define CUBOS_SPAN(name, level)
Constructs a new span with a specified level.
#define CUBOS_SPAN_INFO(name)
Constructs a new info span.
#define CUBOS_SPAN_DEBUG(name)
Constructs a new debug span.
#define CUBOS_SPAN_TRACE(name)
Constructs a new trace span.

Enum documentation

enum class Level

Represents a telemetry level.

Enumerators
Trace

Trace telemetry level, lowest telemetry level. Very verbose.

Debug

Debug telemetry level. Contains logs and tracing useful for debugging, but which are not necessary in release builds.

Info

Information telemetry level. Contains important events that are not errors.

Warn

Warn telemetry level. Contains events that are not errors, but which are unexpected and may be problematic.

Error

Error telemetry level. Contains errors which are recoverable from.

Critical

Critical telemetry level, highest log level. Contains errors which are unrecoverable from.

Off

Off telemetry level, disables all logging/tracing.

Function documentation

void level(Level level)

Set telemetry level.

Parameters
level level

auto level() -> Level

Get telemetry level.

Returns level

Define documentation

#define CUBOS_TEL_LEVEL_TRACE

Trace telemetry level, lowest telemetry level. Very verbose.

#define CUBOS_TEL_LEVEL_DEBUG

Debug telemetry level. Contains logs and tracing useful for debugging, but which are not necessary in release builds.

#define CUBOS_TEL_LEVEL_INFO

Information telemetry level. Contains important events that are not errors.

#define CUBOS_TEL_LEVEL_WARN

Warn telemetry level. Contains events that are not errors, but which are unexpected and may be problematic.

#define CUBOS_TEL_LEVEL_ERROR

Error telemetry level. Contains errors which are recoverable from.

#define CUBOS_TEL_LEVEL_CRITICAL

Critical telemetry level, highest log level. Contains errors which are unrecoverable from.

#define CUBOS_TEL_LEVEL_OFF

Off telemetry level, disables all logging/tracing.

#define CUBOS_TEL_LEVEL

Telemetry level to compile in.

This macro essentially controls the minimum Telemetry level that will be compiled into the binary.

Should be set to one of the following:

By default, on debug builds, this is set to CUBOS_TEL_LEVEL_TRACE. On release builds, this is set to CUBOS_TEL_LEVEL_INFO.

#define CUBOS_SPAN(name, level)

Constructs a new span with a specified level.

Parameters
name Span name.
level Span level.

#define CUBOS_SPAN_INFO(name)

Constructs a new info span.

Parameters
name Span name.

#define CUBOS_SPAN_DEBUG(name)

Constructs a new debug span.

Parameters
name Span name.

#define CUBOS_SPAN_TRACE(name)

Constructs a new trace span.

Parameters
name Span name.