UMPS
The University of Utah Seismograph Stations Message Passing System.
logIt.hpp
1 #ifndef UMPS_LOGGING_LOGIT_HPP
2 #define UMPS_LOGGING_LOGIT_HPP
3 #include <memory>
4 #include "umps/logging/log.hpp"
5 namespace UMPS::Logging
6 {
12 class LogIt : public ILog
13 {
14 public:
17 
19  LogIt();
21 
27  void initialize(const std::string &programName,
28  Level level = Level::INFO,
29  int logFlag = 1);
30 
32  [[nodiscard]] Level getLevel() const noexcept override;
35  void error(const std::string &message) override;
38  void warn(const std::string &message) override;
41  void info(const std::string &message) override;
44  void debug(const std::string &message) override;
45 
48 
49  ~LogIt() override;
51 
53  [[nodiscard]] static bool haveEarthworm() noexcept;
54 
55  LogIt(const LogIt &) = delete;
56  LogIt(LogIt &&) noexcept = delete;
57  LogIt &operator=(const LogIt &) = delete;
58  LogIt &operator=(LogIt &&) noexcept = delete;
59 private:
60  class LogItImpl;
61  std::unique_ptr<LogItImpl> pImpl;
62 };
63 }
64 #endif
Defines the logging level.
This is an abstract base class that allows users to define custom loggers to be used in other applica...
Definition: log.hpp:13
A wrapper to Earthworm's logit facility. If this library is not compiled against Earthworm then all c...
Definition: logIt.hpp:13
void debug(const std::string &message) override
Writes a debug message.
void error(const std::string &message) override
Writes an error message.
void warn(const std::string &message) override
Writes a warning message.
Level getLevel() const noexcept override
static bool haveEarthworm() noexcept
LogIt()
Constructor.
void initialize(const std::string &programName, Level level=Level::INFO, int logFlag=1)
void info(const std::string &message) override
Writes an info message.