logging#

Fully qualified name: carb::logging

namespace logging#

Namespace for logging interfaces and utilities.

Classes#

ScopedFilePause

A class that pauses logging to a file when constructed and resumes logging to a file when destroyed.

ScopedLevelThreadOverride

A RAII object for overriding a thread's log level for a given type in StandardLogger while in scope.

StandardLogger2

A sub-interface of ILogging for StandardLogger instances.

Enumerations#

LogSettingBehavior

Defines a log setting behavior.

OutputStream

Enumerations of output stream types.

OutputType

StandardLogger2 output types.

Functions#

void deregisterLoggingForClient() noexcept

Unregisters the log channels and the logger interface.

ILogging * getLogging()

Accessor for logging interface.

void registerLoggingForClient() noexcept

Acquires the default ILogging interface and registers log channels.

int32_t stringToLevel(carb::cpp::optional< std::string > levelString)

Convert a given string to a log level.

int32_t stringToLevel(const char *levelString)

Convert a given string to a log level.

Structs#

ILogging

Defines the log system that is associated with the Framework .

LogFileConfiguration

Describes the configuration for logging to a file for setFileConfiguration.

Logger

Defines an extension interface for logging backends to register with the ILogging system.

StandardLogger

The default logger provided by the Framework .

StringToLogLevelMapping

A struct that describes level name to integer value.

Typedefs#

LogDestinations

Base type for the flags that indicate which log destinations are currently active.

LogFn

Function pointer typedef for a logging function.

SetLogLevelFn

Defines a callback type for setting log level for every source.

Variables#

constexpr LogDestinations fLogDestinationDebugConsole

Flag to indicate that logging to the system specific debug console is enabled.

constexpr LogDestinations fLogDestinationLogFile

Flag to indicate that logging to a file is currently enabled.

constexpr LogDestinations fLogDestinationNone

Special value to indicate that no log destinations are currently enabled.

constexpr LogDestinations fLogDestinationStandardStreams

Flag to indicate that logging to the standard streams (ie: stdout and stderr) is enabled.

const char *const kKeepSameFile

Can be used by setFileConfiguration.

const int32_t kLevelError

Error level, this is for error messages.

const int32_t kLevelFatal

Fatal level, this is for messages on unrecoverable errors.

const int32_t kLevelInfo

Info level, this is for informational messages.

const int32_t kLevelVerbose

Verbose level, this is for detailed diagnostics messages.

const int32_t kLevelWarn

Warning level, this is for warning messages.

const StringToLogLevelMapping kStringToLevelMappings

A mapping of log level names to integer value.

const size_t kStringToLevelMappingsCount

The number of items in kStringToLevelMappings .