Lightstreamer C++ Client SDK
Loading...
Searching...
No Matches
Logger.h
1/*
2 * Copyright (C) 2023 Lightstreamer Srl
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16#ifndef INCLUDED_Lightstreamer_Logger
17#define INCLUDED_Lightstreamer_Logger
18
19#include <string>
20
21namespace Lightstreamer {
22
27class Logger {
28public:
29 virtual ~Logger() {};
35 virtual void error(const std::string& line) = 0;
41 virtual void warn(const std::string& line) = 0;
47 virtual void info(const std::string& line) = 0;
53 virtual void debug(const std::string& line) = 0;
59 virtual void trace(const std::string& line) = 0;
65 virtual void fatal(const std::string& line) = 0;
73 virtual bool isTraceEnabled() = 0;
81 virtual bool isDebugEnabled() = 0;
89 virtual bool isInfoEnabled() = 0;
97 virtual bool isWarnEnabled() = 0;
105 virtual bool isErrorEnabled() = 0;
113 virtual bool isFatalEnabled() = 0;
114};
115
116} // namespace Lightstreamer
117
118#endif // INCLUDED_Lightstreamer_Logger
Interface to be implemented to consume log from the library.
Definition Logger.h:27
virtual bool isErrorEnabled()=0
Checks if this logger is enabled for the Error level.
virtual void error(const std::string &line)=0
Receives log messages at Error level.
virtual void debug(const std::string &line)=0
Receives log messages at Debug level.
virtual bool isDebugEnabled()=0
Checks if this logger is enabled for the Debug level.
virtual bool isFatalEnabled()=0
Checks if this logger is enabled for the Fatal level.
virtual bool isTraceEnabled()=0
Checks if this logger is enabled for the Trace level.
virtual bool isInfoEnabled()=0
Checks if this logger is enabled for the Info level.
virtual void info(const std::string &line)=0
Receives log messages at Info level.
virtual void fatal(const std::string &line)=0
Receives log messages at Fatal level.
virtual void warn(const std::string &line)=0
Receives log messages at Warn level.
virtual void trace(const std::string &line)=0
Receives log messages at Trace level.
virtual bool isWarnEnabled()=0
Checks if this logger is enabled for the Warn level.