Celeritas  0.5.0-56+6b053cd
Classes | Typedefs | Enumerations | Functions
LoggerTypes.hh File Reference

Type definitions for logging utilities. More...

#include <cstdlib>
#include <functional>
#include <string>
#include <string_view>
This graph shows which files directly or indirectly include this file:

Classes

struct  celeritas::LogProvenance
 Stand-in for a more complex class for the "provenance" of data. More...
 

Typedefs

using celeritas::LogHandler = std::function< void(LogProvenance, LogLevel, std::string)>
 Type for handling a log message.
 
using celeritas::Provenance = LogProvenance
 

Enumerations

enum class  celeritas::LogLevel {
  debug , diagnostic , status , info ,
  warning , error , critical , size_
}
 Enumeration for how important a log message is. More...
 

Functions

char const * celeritas::to_cstring (LogLevel lev)
 Get the plain text equivalent of the LogLevel enum.
 
char const * celeritas::to_color_code (LogLevel lev)
 Get an ANSI color code appropriate to each log level.
 

Detailed Description

Type definitions for logging utilities.

Enumeration Type Documentation

◆ LogLevel

enum celeritas::LogLevel
strong

Enumeration for how important a log message is.

Enumerator
debug 

Debugging messages.

diagnostic 

Diagnostics about current program execution.

status 

Program execution status (what stage is beginning)

info 

Important informational messages.

warning 

Warnings about unusual events.

error 

Something went wrong, but execution can continue.

critical 

Something went terribly wrong, should probably abort.

size_ 

Sentinel value for looping over log levels.