gpu.cpp 0.1.0
 
Loading...
Searching...
No Matches
logging.h File Reference
#include <cstdio>
#include <cstdarg>

Go to the source code of this file.

Classes

struct  gpu::Logger
 Logger struct for logging messages. stream: The stream to log to. buffer: A buffer to store the formatted message. level: The log level to log messages at. More...
 

Namespaces

namespace  gpu
 

Enumerations

enum  gpu::LogLevel { gpu::kError = 0 , gpu::kWarn = 1 , gpu::kInfo = 2 , gpu::kTrace = 3 }
 

Functions

void gpu::LOG (Logger &logger, int level, const char *message,...)
 Log a message to the logger. If NDEBUG is defined in a source or as a compiler flag, this is a no-op.
 
void gpu::setLogLevel (int level)
 Set the log level of the default logger.
 

Variables

static const char * gpu::kLevelStr [] = {"error", "warn", "info", "trace"}
 
static Logger gpu::kDefLog = {stdout, "", kInfo}
 Default logger for logging messages to stdout at the info level. Output stream and logging level for the default logger can be globally changed on a per-program basis.