qHexWalker
0.0.1
Hexagonal Grid Pathfinding & Maze Visualization on Interactive Maps
Loading...
Searching...
No Matches
logger.h
Go to the documentation of this file.
1
#ifndef Q_HEX_WALKER_LOGGER_H
2
#define Q_HEX_WALKER_LOGGER_H
3
4
#include "spdlog/async.h"
5
#include "spdlog/sinks/stdout_color_sinks.h"
6
7
namespace
TD
{
8
class
Logger
{
9
public
:
10
explicit
Logger
(
const
std::string_view loggerName) :
loggerName_
(loggerName) {}
11
void
Init
(
const
size_t
queueSize = 8192,
const
size_t
threadCount = 1) {
12
auto
console = spdlog::sinks::stdout_color_sink_mt();
13
spdlog::init_thread_pool(queueSize, threadCount);
14
logger_
= spdlog::create_async<spdlog::sinks::stdout_color_sink_mt>(
loggerName_
);
15
spdlog::set_default_logger(
logger_
);
16
}
17
18
private
:
19
std::string
loggerName_
;
20
std::shared_ptr<spdlog::logger>
logger_
;
21
};
22
}
// namespace TD
23
24
#endif
// Q_HEX_WALKER_LOGGER_H
TD::Logger
Definition
logger.h:8
TD::Logger::loggerName_
std::string loggerName_
Definition
logger.h:19
TD::Logger::logger_
std::shared_ptr< spdlog::logger > logger_
Definition
logger.h:20
TD::Logger::Logger
Logger(const std::string_view loggerName)
Definition
logger.h:10
TD::Logger::Init
void Init(const size_t queueSize=8192, const size_t threadCount=1)
Definition
logger.h:11
TD
Definition
entryPoint.h:19
src
core
logger.h
Generated by
1.9.8