HephAudio v3.1.0
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 is a static class and 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
messagemessage that will be printed.
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
messagemessage that will be printed.
logLevelone of the HEPH_CL_* macros.
libNamename of the library thats printing. The default value is "HephLibs".

◆ LogInfo() [1/2]

static void Heph::ConsoleLogger::LogInfo ( const std::string & message)
static

prints the provided message to the console as INFO.

Parameters
messagemessage that will be printed.

◆ LogInfo() [2/2]

static void Heph::ConsoleLogger::LogInfo ( const std::string & message,
const std::string & libName )
static

prints the provided message to the console as INFO.

Parameters
messagemessage that will be printed.
libNamename of the library thats printing. The default value is "HephLibs".

◆ LogWarning() [1/2]

static void Heph::ConsoleLogger::LogWarning ( const std::string & message)
static

prints the provided message to the console as WARNING.

Parameters
messagemessage that will be printed.

◆ LogWarning() [2/2]

static void Heph::ConsoleLogger::LogWarning ( const std::string & message,
const std::string & libName )
static

prints the provided message to the console as WARNING.

Parameters
messagemessage that will be printed.
libNamename of the library thats printing. The default value is "HephLibs".

◆ LogError() [1/2]

static void Heph::ConsoleLogger::LogError ( const std::string & message)
static

prints the provided message to the console as ERROR.

Parameters
messagemessage that will be printed.

◆ LogError() [2/2]

static void Heph::ConsoleLogger::LogError ( const std::string & message,
const std::string & libName )
static

prints the provided message to the console as ERROR.

Parameters
messagemessage that will be printed.
libNamename of the library thats printing. The default value is "HephLibs".

◆ LogSuccess() [1/2]

static void Heph::ConsoleLogger::LogSuccess ( const std::string & message)
static

prints the provided message to the console as SUCCESS.

Parameters
messagemessage that will be printed.

◆ LogSuccess() [2/2]

static void Heph::ConsoleLogger::LogSuccess ( const std::string & message,
const std::string & libName )
static

prints the provided message to the console as SUCCESS.

Parameters
messagemessage that will be printed.
libNamename of the library thats printing. The default value is "HephLibs".

◆ LogDebug() [1/2]

static void Heph::ConsoleLogger::LogDebug ( const std::string & message)
static

prints the provided message to the console as DEBUG.

Parameters
messagemessage that will be printed.

◆ LogDebug() [2/2]

static void Heph::ConsoleLogger::LogDebug ( const std::string & message,
const std::string & libName )
static

prints the provided message to the console as DEBUG.

Parameters
messagemessage that will be printed.
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.