HephAudio v3.0.6
A cross-platform C++ library for recording, playing, and processing audio on Windows, Android, Linux, iOS, and macOS.
Loading...
Searching...
No Matches
Heph::ConsoleLogger Class Referencefinal

class for printing formatted messages to the console. More...

#include <ConsoleLogger.h>

Public Member Functions

 ConsoleLogger (const ConsoleLogger &)=delete
 
ConsoleLoggeroperator= (const ConsoleLogger &)=delete
 

Static Public Member Functions

static void Log (const std::string &message, const char *logLevel)
 
static void Log (const std::string &message, const char *logLevel, const std::string &libName)
 
static void LogInfo (const std::string &message)
 
static void LogInfo (const std::string &message, const std::string &libName)
 
static void LogWarning (const std::string &message)
 
static void LogWarning (const std::string &message, const std::string &libName)
 
static void LogError (const std::string &message)
 
static void LogError (const std::string &message, const std::string &libName)
 
static void LogSuccess (const std::string &message)
 
static void LogSuccess (const std::string &message, const std::string &libName)
 
static void LogDebug (const std::string &message)
 
static void LogDebug (const std::string &message, const std::string &libName)
 
static void EnableColoredOutput ()
 
static void DisableColoredOutput ()
 

Detailed Description

class for printing formatted messages to the console.

Note
this class cannot be instantiated.

Member Function Documentation

◆ Log() [1/2]

static void Heph::ConsoleLogger::Log ( const std::string & message,
const char * logLevel )
static

prints the provided message to the console.

Parameters
logLevelone of the HEPH_CL_* macros.

◆ Log() [2/2]

static void Heph::ConsoleLogger::Log ( const std::string & message,
const char * logLevel,
const std::string & libName )
static

prints the provided message to the console.

Parameters
logLevelone of the HEPH_CL_* macros.
libNamename of the library thats printing. The default value is "HephLibs".

◆ EnableColoredOutput()

static void Heph::ConsoleLogger::EnableColoredOutput ( )
static

enables the use of ASCII color codes.

◆ DisableColoredOutput()

static void Heph::ConsoleLogger::DisableColoredOutput ( )
static

disables the use of ASCII color codes.