Logging class.
More...
#include <Log.hpp>
Logging class.
Usage:
Log() <<
"Testing: " << 5 <<
"\n";
Log(const Channel channel=DEFAULT)
Constructor.
Definition: Log.cpp:19
◆ Channel
| Enumerator |
|---|
| DEFAULT | Default channel.
|
| INFO | Information.
|
| WARNING | Warnings.
|
| ERR | Error.
|
| NUMBER_OF_CHANNELS | Maximum number of channels, ensure this is the last element of the enum if adding channels.
|
◆ Log()
◆ ~Log()
◆ CloseFile()
Close any open logging file.
◆ operator<<() [1/11]
| Log & Log::operator<< |
( |
const double |
value | ) |
|
Output a double.
- Parameters
-
- Returns
- The Log instance.
◆ operator<<() [2/11]
| Log & Log::operator<< |
( |
const float |
value | ) |
|
Output a float.
- Parameters
-
- Returns
- The Log instance
◆ operator<<() [3/11]
| Log & Log::operator<< |
( |
const glm::vec2 & |
value | ) |
|
Output a vec2.
- Parameters
-
- Returns
- The Log instance.
◆ operator<<() [4/11]
| Log & Log::operator<< |
( |
const glm::vec3 & |
value | ) |
|
Output a vec3.
- Parameters
-
- Returns
- The Log instance.
◆ operator<<() [5/11]
| Log & Log::operator<< |
( |
const glm::vec4 & |
value | ) |
|
Output a vec4.
- Parameters
-
- Returns
- The Log instance.
◆ operator<<() [6/11]
| Log & Log::operator<< |
( |
const int |
value | ) |
|
Output an integer.
- Parameters
-
- Returns
- The Log instance
◆ operator<<() [7/11]
| Log & Log::operator<< |
( |
const std::string & |
text | ) |
|
Output some text.
- Parameters
-
- Returns
- The Log instance
◆ operator<<() [8/11]
| Log & Log::operator<< |
( |
const time_t |
value | ) |
|
Output a time.
Formatted Y-m-d H:M:S.
- Parameters
-
- Returns
- The Log instance
◆ operator<<() [9/11]
| Log & Log::operator<< |
( |
const unsigned int |
value | ) |
|
Output an unsigned integer.
- Parameters
-
- Returns
- The Log instance.
◆ operator<<() [10/11]
| Log & Log::operator<< |
( |
const unsigned long long |
value | ) |
|
Output an unsigned long long.
- Parameters
-
- Returns
- The Log instance.
◆ operator<<() [11/11]
| Log & Log::operator<< |
( |
const unsigned long |
value | ) |
|
Output an unsigned long.
- Parameters
-
- Returns
- The Log instance.
◆ ResetCallback()
| void Log::ResetCallback |
( |
| ) |
|
|
static |
Remove the callback function.
◆ SetupCallback()
| void Log::SetupCallback |
( |
std::function< void(const Channel channel, const std::string &message)> |
callback | ) |
|
|
static |
Setup callback.
- Parameters
-
| callback | Callback function to call whenever something is logged. |
- Returns
- Whether the operation succeeded.
◆ SetupFile()
| void Log::SetupFile |
( |
const std::string & |
filename | ) |
|
|
static |
Setup file to log to.
- Parameters
-
| filename | The file to write to. |
The documentation for this class was generated from the following files: