cAudio  2.3.0
3d Audio Engine
ILogReceiver.h
1 // Copyright (c) 2008-2011 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones, Murat (wolfmanfx) Sari
2 // This file is part of the "cAudio Engine"
3 // For conditions of distribution and use, see copyright notice in cAudio.h
4 
5 #pragma once
6 
7 namespace cAudio
8 {
10  enum LogLevel
11  {
12  ELL_DEBUG,
13  ELL_INFO,
14  ELL_WARNING,
15  ELL_ERROR,
16  ELL_CRITICAL,
17  ELL_COUNT
18  };
19 
21  const char* const LogLevelStrings[] =
22  {
23  "Debug",
24  "Information",
25  "Warning",
26  "Error",
27  "Critical",
28  0
29  };
30 
33  {
34  public:
35  ILogReceiver() { }
36  virtual ~ILogReceiver() { }
37 
39 
44  virtual bool OnLogMessage(const char* sender, const char* message, LogLevel level, float time) = 0;
45  };
46 };
47 
cAudio::ILogReceiver
Interface for receiving log messages and relaying them to some kind of output device or stream.
Definition: ILogReceiver.h:32
cAudio
Main namespace for the entire cAudio library.
Definition: cAudioCapture.h:15
cAudio::LogLevel
LogLevel
Enum of all supported log levels in cAudio.
Definition: ILogReceiver.h:10
cAudio::ILogReceiver::OnLogMessage
virtual bool OnLogMessage(const char *sender, const char *message, LogLevel level, float time)=0
Called on every logged message that is greater than or equal to the minimum log level.
cAudio::LogLevelStrings
const char *const LogLevelStrings[]
Contains strings for each log level to make them easier to print to a stream.
Definition: ILogReceiver.h:21