Repo-Init
 
Loading...
Searching...
No Matches
Logger.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <spdlog/spdlog.h>
4
8class MainLogger {
9 private:
10 std::shared_ptr<spdlog::logger> _mainLogger;
11
12 public:
18 MainLogger(const std::string &lokiAddr, const std::string &sentryAddr);
19
21 MainLogger(const MainLogger & /*unused*/) = delete;
22
24 MainLogger(MainLogger && /*unused*/) = delete;
25
27 MainLogger &operator=(MainLogger /*unused*/) = delete;
28
30 MainLogger &operator=(MainLogger && /*unused*/) = delete;
31
36 [[nodiscard]] std::shared_ptr<spdlog::logger> getLogger() const { return _mainLogger; }
37
42};
~MainLogger()
Definition Logger.cpp:48
MainLogger & operator=(MainLogger &&)=delete
Move assignment operator.
MainLogger & operator=(MainLogger)=delete
Copy assignment operator.
std::shared_ptr< spdlog::logger > getLogger() const
Definition Logger.hpp:36
MainLogger(const std::string &lokiAddr, const std::string &sentryAddr)
Definition Logger.cpp:19
std::shared_ptr< spdlog::logger > _mainLogger
Definition Logger.hpp:10
MainLogger(const MainLogger &)=delete
Copy constructor.
MainLogger(MainLogger &&)=delete
Move constructor.