Game Audio Module
A C++ audio system using miniaudio with Python bindings
Loading...
Searching...
No Matches
Classes | Namespaces | Macros | Enumerations
logging.h File Reference
#include <string>
#include <sstream>

Go to the source code of this file.

Classes

class  audio::Logger
 Global logger for the audio module (runtime level control). More...
 

Namespaces

namespace  audio
 

Macros

#define AUDIO_LOG(level, stream_expr)
 Logging macro for stream-style messages.
 

Enumerations

enum class  audio::LogLevel {
  audio::Off = 0 , audio::Error = 1 , audio::Warn = 2 , audio::Info = 3 ,
  audio::Debug = 4
}
 Log severity levels for audio diagnostics. More...
 

Macro Definition Documentation

◆ AUDIO_LOG

#define AUDIO_LOG (   level,
  stream_expr 
)
Value:
do { \
if (audio::Logger::IsEnabled(level)) { \
std::ostringstream _audio_log_stream; \
_audio_log_stream << stream_expr; \
audio::Logger::Log(level, _audio_log_stream.str());\
} \
} while (0)
static bool IsEnabled(LogLevel level)
Check if a log level is enabled.
Definition logging.cpp:19

Logging macro for stream-style messages.

Logging is always compiled in but defaults to Off at runtime. Use set_log_level() to enable logging output.