KDSPDSetup
Small library to initialize spdlog loggers from a toml configuration file.
kdspdsetup.h
Go to the documentation of this file.
1
/*
2
This file is part of KDSpdSetup.
3
4
SPDX-FileCopyrightText: 2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
5
6
SPDX-License-Identifier: MIT
7
8
Contact KDAB at <info@kdab.com> for commercial licensing options.
9
*/
10
#pragma once
11
12
#include <unordered_map>
13
#include <map>
14
#include <vector>
15
16
#include <spdlog/async.h>
17
#include <spdlog/spdlog.h>
18
#include <spdlog/async_logger.h>
19
#include <spdlog/pattern_formatter.h>
20
#include <spdlog/sinks/basic_file_sink.h>
21
#include <spdlog/sinks/daily_file_sink.h>
22
#include <spdlog/sinks/null_sink.h>
23
#include <spdlog/sinks/rotating_file_sink.h>
24
#include <spdlog/sinks/stdout_color_sinks.h>
25
#include <spdlog/sinks/stdout_sinks.h>
26
#ifdef __linux__
27
#include <spdlog/sinks/syslog_sink.h>
28
#elif _WIN32
29
#include <spdlog/sinks/msvc_sink.h>
30
#endif
31
32
#include <toml.hpp>
33
34
#include <string>
35
40
namespace
KDSPDSetup
{
41
48
void
setupFrom
(std::string
const
&file);
49
50
}
// namespace KDSPDSetup
KDSPDSetup
The only public-facing namespace in the library.
Definition:
details.cpp:12
KDSPDSetup::setupFrom
void setupFrom(std::string const &file)
This function performs all setup needed to start logging. It should be the only callable part of the ...
Definition:
kdspdsetup.cpp:16
src
KDSpdSetup
kdspdsetup.h
Generated by
1.9.1