mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 11:01:49 +00:00
format: reformat project
Signed-off-by: Vyacheslav Ivanov <islavaivanov76@gmail.com>
This commit is contained in:
parent
736cd175d5
commit
bbf33e8e4d
202 changed files with 7389 additions and 5609 deletions
|
|
@ -1,14 +1,12 @@
|
|||
#ifndef DEBUG_LOGGER_HPP_
|
||||
#define DEBUG_LOGGER_HPP_
|
||||
|
||||
#include <sstream>
|
||||
#include <fstream>
|
||||
#include <mutex>
|
||||
#include <sstream>
|
||||
|
||||
namespace debug {
|
||||
enum class LogLevel {
|
||||
debug, info, warning, error
|
||||
};
|
||||
enum class LogLevel { debug, info, warning, error };
|
||||
|
||||
class Logger;
|
||||
|
||||
|
|
@ -17,10 +15,12 @@ namespace debug {
|
|||
LogLevel level;
|
||||
std::stringstream ss;
|
||||
public:
|
||||
LogMessage(Logger* logger, LogLevel level) : logger(logger), level(level) {}
|
||||
LogMessage(Logger* logger, LogLevel level)
|
||||
: logger(logger), level(level) {
|
||||
}
|
||||
~LogMessage();
|
||||
|
||||
template<class T>
|
||||
template <class T>
|
||||
LogMessage& operator<<(const T& x) {
|
||||
ss << x;
|
||||
return *this;
|
||||
|
|
@ -34,8 +34,10 @@ namespace debug {
|
|||
static unsigned moduleLen;
|
||||
|
||||
std::string name;
|
||||
|
||||
static void log(LogLevel level, const std::string& name, const std::string& message);
|
||||
|
||||
static void log(
|
||||
LogLevel level, const std::string& name, const std::string& message
|
||||
);
|
||||
public:
|
||||
static void init(const std::string& filename);
|
||||
static void flush();
|
||||
|
|
@ -62,4 +64,4 @@ namespace debug {
|
|||
};
|
||||
}
|
||||
|
||||
#endif // DEBUG_LOGGER_HPP_
|
||||
#endif // DEBUG_LOGGER_HPP_
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue