dfx 0.1.0
Linux-based dynamic dataflow executor
Loading...
Searching...
No Matches
LoggerFactory.hpp
1// SPDX-FileCopyrightText: 2025 Vincent Leroy
2// SPDX-License-Identifier: MIT
3//
4// This file is part of dfx.
5//
6// Licensed under the MIT License. See the LICENSE file in the project root
7// for full license information.
8
9#pragma once
10
11// Project includes
12#include "Log.hpp"
13
14namespace dfx::Utils
15{
16class LoggerFactory
17{
18public:
19 using level = spdlog::level::level_enum;
20
21 struct Config
22 {
23 level globalLevel = spdlog::level::info;
24 level flushOn = spdlog::level::err;
25 };
26
27public:
28 static std::string defaultLoggerName;
29
30public:
31 static LoggerFactory & instance()
32 {
33 static LoggerFactory inst;
34 return inst;
35 }
36
37 void reconfigureAllLoggers(Config const & config);
38
39private:
41};
42} // !namespace dfx::Utils
43
44#define sLoggerFactory ::dfx::Utils::LoggerFactory::instance()
Definition LoggerFactory.hpp:17
Definition SystemConfigCommandHandler.hpp:15
Definition LoggerFactory.hpp:22