Grindstone Game Engine
v0.2.0
An open source game engine and toolkit.
Toggle main menu visibility
Loading...
Searching...
No Matches
Logging.hpp
1
#pragma once
2
3
#include <string>
4
#include <chrono>
5
#include <stdint.h>
6
7
namespace
Grindstone {
8
enum class
LogSource : uint16_t {
9
Unknown,
10
EngineCore
,
11
Editor,
12
EditorImporter,
13
GraphicsAPI,
14
RenderingBackend,
15
Rendering,
16
Audio,
17
Physics,
18
Scripting,
19
Count
20
};
21
22
constexpr
const
char
* logSourceStrings[] = {
23
"Unknown"
,
24
"Engine Core"
,
25
"Editor"
,
26
"Editor Importer"
,
27
"Graphics API"
,
28
"Rendering Backend"
,
29
"Rendering"
,
30
"Audio"
,
31
"Physics"
,
32
"Scripting"
33
};
34
35
using
LogInternalType = uint32_t;
36
constexpr
LogInternalType LOG_UNSPECIFIED_INTERNAL_TYPE = UINT32_MAX;
37
38
enum class
LogSeverity : uint8_t {
39
Info,
40
Trace,
41
Warning,
42
Error,
43
Fatal
44
};
45
46
constexpr
const
char
* logSeverityPrefixes[] = {
47
"Info"
,
48
"Trace"
,
49
"Warning"
,
50
"Error"
,
51
"Fatal Error"
52
};
53
54
struct
ConsoleMessage
{
55
std::string message;
56
std::string filename;
57
uint32_t line;
58
std::chrono::system_clock::time_point timepoint;
59
LogSource source;
60
LogInternalType internalType;
61
LogSeverity severity;
62
};
63
};
Grindstone::EngineCore
Definition
EngineCore.hpp:59
Grindstone::ConsoleMessage
Definition
Logging.hpp:54
sources
code
Common
Logging.hpp
Generated by
1.17.0