Skip to content
Flecs v4.1
Logging

Logging functions. More...

Functions

void flecs::log::set_level (int level)
 Set the log level.
int flecs::log::get_level ()
 Get the log level.
void flecs::log::enable_colors (bool enabled=true)
 Enable colors in logging.
void flecs::log::enable_timestamp (bool enabled=true)
 Enable timestamps in logging.
void flecs::log::enable_timedelta (bool enabled=true)
 Enable time delta in logging.
void flecs::log::dbg (_::fmt_str fmt,...)
 Debug trace (level 1).
void flecs::log::trace (_::fmt_str fmt,...)
 Trace (level 0).
void flecs::log::warn (_::fmt_str fmt,...)
 Warning (level -2).
void flecs::log::err (_::fmt_str fmt,...)
 Error (level -3).
void flecs::log::push (_::fmt_str fmt,...)
 Trace and increase log indentation.
void flecs::log::push ()
 Increase log indentation.
void flecs::log::pop ()
 Decrease log indentation.

Detailed Description

Logging functions.

Function Documentation

◆ dbg()

void flecs::log::dbg ( _::fmt_str fmt,
... )
inline

Debug trace (level 1).

Parameters
fmtThe format string.

Definition at line 97 of file log.hpp.

◆ enable_colors()

void flecs::log::enable_colors ( bool enabled = true)
inline

Enable colors in logging.

Parameters
enabledWhether to enable colors (default true).

Definition at line 73 of file log.hpp.

◆ enable_timedelta()

void flecs::log::enable_timedelta ( bool enabled = true)
inline

Enable time delta in logging.

Parameters
enabledWhether to enable time delta (default true).

Definition at line 89 of file log.hpp.

◆ enable_timestamp()

void flecs::log::enable_timestamp ( bool enabled = true)
inline

Enable timestamps in logging.

Parameters
enabledWhether to enable timestamps (default true).

Definition at line 81 of file log.hpp.

◆ err()

void flecs::log::err ( _::fmt_str fmt,
... )
inline

Error (level -3).

Parameters
fmtThe format string.

Definition at line 130 of file log.hpp.

◆ get_level()

int flecs::log::get_level ( )
inline

Get the log level.

Returns
The current log level.

Definition at line 65 of file log.hpp.

◆ pop()

void flecs::log::pop ( )
inline

Decrease log indentation.

Definition at line 155 of file log.hpp.

◆ push() [1/2]

void flecs::log::push ( )
inline

Increase log indentation.

Definition at line 150 of file log.hpp.

◆ push() [2/2]

void flecs::log::push ( _::fmt_str fmt,
... )
inline

Trace and increase log indentation.

Parameters
fmtThe format string.

Definition at line 141 of file log.hpp.

◆ set_level()

void flecs::log::set_level ( int level)
inline

Set the log level.

Parameters
levelThe log level to set.

Definition at line 57 of file log.hpp.

◆ trace()

void flecs::log::trace ( _::fmt_str fmt,
... )
inline

Trace (level 0).

Parameters
fmtThe format string.

Definition at line 108 of file log.hpp.

◆ warn()

void flecs::log::warn ( _::fmt_str fmt,
... )
inline

Warning (level -2).

Parameters
fmtThe format string.

Definition at line 119 of file log.hpp.