Class log#

Class Documentation#

class log#

Class used to show logs in F3D.

A class to output logs to the standard output. It supports different levels, errors, warnings and info, with associated coloring. A few static methods exists to control the coloring and the verbosity level A waitForUser utility static method exist for windows.

Public Types

enum class VerboseLevel : unsigned char#

Enumeration of verbose levels#

DEBUG: All logs are displayed, including from third parties. INFO: Standard logging level, the default. WARN: Only warnings and errors are displayed. ERROR: Only errors are displayed. QUIET: Logging is fully disabled.

Values:

enumerator DEBUG#
enumerator INFO#
enumerator WARN#
enumerator ERROR#
enumerator QUIET#

Public Static Functions

template<typename ...Args>
static inline void print(VerboseLevel level, Args... args)#

Log provided args as provided verbose level.

template<typename ...Args>
static inline void debug(Args... args)#

Log provided args as a debug.

template<typename ...Args>
static inline void info(Args... args)#

Log provided args as an info.

template<typename ...Args>
static inline void warn(Args... args)#

Log provided args as a warning.

template<typename ...Args>
static inline void error(Args... args)#

Log provided args as an error.

static void setUseColoring(bool use)#

Set the coloring usage, if applicable (eg: console output).

static void setVerboseLevel(VerboseLevel level)#

Set the verbose level.

static void waitForUser()#

Wait for user if applicable (eg: win32 output window). No effect otherwise.