pulsar-client-cpp
Loading...
Searching...
No Matches
Logger.h
1
19#pragma once
20
21#include <pulsar/defines.h>
22
23#include <memory>
24#include <string>
25
26namespace pulsar {
27
28class PULSAR_PUBLIC Logger {
29 public:
30 enum Level
31 {
32 LEVEL_DEBUG = 0,
33 LEVEL_INFO = 1,
34 LEVEL_WARN = 2,
35 LEVEL_ERROR = 3
36 };
37
38 virtual ~Logger() {}
39
46 virtual bool isEnabled(Level level) = 0;
47
55 virtual void log(Level level, int line, const std::string& message) = 0;
56};
57
58class PULSAR_PUBLIC LoggerFactory {
59 public:
60 virtual ~LoggerFactory() {}
61
69 virtual Logger* getLogger(const std::string& fileName) = 0;
70};
71
72} // namespace pulsar
Definition Logger.h:58
virtual Logger * getLogger(const std::string &fileName)=0
Definition Logger.h:28
virtual bool isEnabled(Level level)=0
virtual void log(Level level, int line, const std::string &message)=0
Definition Authentication.h:31