NoJobEngine
2.0.7
Toggle main menu visibility
Loading...
Searching...
No Matches
Log.h
Go to the documentation of this file.
1
6
#pragma once
7
8
#include <iostream>
9
#include <mutex>
10
#include <string_view>
11
12
namespace
NoJob
13
{
14
class
Log
15
{
16
public
:
17
static
void
Info
(std::string_view message) { Write(
"INFO"
, message); }
18
static
void
Warn
(std::string_view message) { Write(
"WARN"
, message); }
19
static
void
Error
(std::string_view message) { Write(
"ERROR"
, message); }
20
21
private
:
22
static
void
Write(std::string_view level, std::string_view message)
23
{
24
static
std::mutex mutex;
25
std::lock_guard<std::mutex> lock(mutex);
26
std::cerr <<
"[NoJob]["
<< level <<
"] "
<< message <<
'\n'
;
27
}
28
};
29
}
NoJob::Log
Definition
Log.h:15
NoJob::Log::Warn
static void Warn(std::string_view message)
Definition
Log.h:18
NoJob::Log::Info
static void Info(std::string_view message)
Definition
Log.h:17
NoJob::Log::Error
static void Error(std::string_view message)
Definition
Log.h:19
NoJob
Definition
BTActionNode.h:13
Engine
Core
Log.h
Generated by
1.18.0