AeonGUI
A portable video game graphic user interface library.
Loading...
Searching...
No Matches
LogLevel.hpp
Go to the documentation of this file.
1/*
2Copyright (C) 2026 Rodrigo Jose Hernandez Cordoba
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/
19#ifndef AEONGUI_LOGLEVEL_H
20#define AEONGUI_LOGLEVEL_H
21#include <iostream>
22
23namespace AeonGUI
24{
26 enum class LogLevel
27 {
28 Debug = 0,
32 };
33
38 inline std::ostream& operator<< ( std::ostream& os, LogLevel level )
39 {
40 switch ( level )
41 {
42 case LogLevel::Debug:
43 os << "\x1B[34m" << "[DEBUG]" << "\x1B[m ";
44 break;
45 case LogLevel::Info:
46 os << "\x1B[32m" << "[INFO]" << "\x1B[m ";
47 break;
49 os << "\x1B[33m" << "[WARNING]" << "\x1B[m ";
50 break;
51 case LogLevel::Error:
52 os << "\x1B[31m" << "[ERROR]" << "\x1B[m ";
53 break;
54 }
55 return os;
56 }
57}
58#endif
LogLevel
Severity levels for log messages.
Definition LogLevel.hpp:27
@ Warning
Potential issues that may need attention.
Definition LogLevel.hpp:30
@ Info
General informational messages.
Definition LogLevel.hpp:29
@ Error
Error conditions.
Definition LogLevel.hpp:31
@ Debug
Detailed diagnostic information.
Definition LogLevel.hpp:28