105 public std::streambuf
156 int overflow(
int c = -1)
override;
167 void setLevel(std::string level);
173 std::string getLevel();
208 void distribute_(
const std::string& outstring);
211 std::string expandPrefix_(
const std::string &
prefix, time_t time)
const;
213 char * pbuf_ =
nullptr;
242 bool isInCache_(std::string
const & line);
252 std::string addToCache_(std::string
const & line);
255 Size getNextLogCounter_();
274 virtual void logNotify();
363 void setLevel(std::string level);
369 std::string getLevel();
389 void insert(std::ostream & s);
401 void remove(std::ostream & s);
404 void insertNotification(std::ostream & s,
427 void setPrefix(
const std::ostream & s,
const std::string &
prefix);
431 void setPrefix(
const std::string &
prefix);
441 bool hasStream_(std::ostream & stream);
455 #define OPENMS_LOG_FATAL_ERROR \ 456 OPENMS_THREAD_CRITICAL(LOGSTREAM) \ 457 OpenMS_Log_fatal << __FILE__ << "(" << __LINE__ << "): " 460 #define OPENMS_LOG_ERROR \ 461 OPENMS_THREAD_CRITICAL(LOGSTREAM) \ 465 #define OPENMS_LOG_WARN \ 466 OPENMS_THREAD_CRITICAL(LOGSTREAM) \ 470 #define OPENMS_LOG_INFO \ 471 OPENMS_THREAD_CRITICAL(LOGSTREAM) \ 475 #define OPENMS_LOG_DEBUG \ 476 OPENMS_THREAD_CRITICAL(LOGSTREAM) \ 477 OpenMS_Log_debug << [](){ constexpr const char* x = (past_last_slash(__FILE__)); return x; }() << "(" << __LINE__ << "): " 480 #define OPENMS_LOG_DEBUG_NOFILE \ 481 OPENMS_THREAD_CRITICAL(LOGSTREAM) \ std::string level_
Definition: LogStream.h:214
int counter
Definition: LogStream.h:227
Logger::LogStream OpenMS_Log_warn
Global static instance of a LogStream to capture messages classified as warnings. By default it is bo...
Logger::LogStream OpenMS_Log_debug
Global static instance of a LogStream to capture messages classified as debug output. By default it is not bound to any output stream. TOPP(AS)Base will connect cout, iff 0 < debug-level.
static const std::string UNKNOWN_LOG_LEVEL
Definition: LogStream.h:115
Definition: LogStream.h:263
LogStream * registered_at_
Definition: LogStream.h:285
const double c
Definition: Constants.h:214
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
StreamStruct()
Definition: LogStream.h:187
std::list< StreamStruct > stream_list_
Definition: LogStream.h:215
bool delete_buffer_
Definition: LogStream.h:448
Log Stream Class.
Definition: LogStream.h:316
std::ostream * stream
Definition: LogStream.h:183
std::map< Size, std::string > log_time_cache_
Cache of the occurrence sequence of the last two log messages.
Definition: LogStream.h:239
std::string prefix
Definition: LogStream.h:184
static String prefix(const String &this_s, size_t length)
Definition: StringUtilsSimple.h:147
std::stringstream stream_
Definition: LogStream.h:283
Holds a counter of occurrences and an index for the occurrence sequence of the corresponding log mess...
Definition: LogStream.h:224
Logger::LogStream OpenMS_Log_fatal
Global static instance of a LogStream to capture messages classified as fatal errors. By default it is bound to cerr.
~StreamStruct()
Delete the notification target.
Definition: LogStream.h:193
Color and style the fonts shown on cout/cerr (or other streams)
Definition: Colorizer.h:96
Holds a stream that is connected to the LogStream. It also includes the minimum and maximum level at ...
Definition: LogStream.h:181
std::string incomplete_line_
Definition: LogStream.h:216
Logger::LogStream OpenMS_Log_error
Global static instance of a LogStream to capture messages classified as errors. By default it is boun...
std::map< std::string, LogCacheStruct > log_cache_
Cache of the last two log messages.
Definition: LogStream.h:237
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
LogStreamNotifier * target
Definition: LogStream.h:185
static const time_t MAX_TIME
Definition: LogStream.h:114
std::list< LogStreamBuf::StreamStruct >::iterator StreamIterator
Definition: LogStream.h:438
Logger::LogStream OpenMS_Log_info
Global static instance of a LogStream to capture messages classified as information. By default it is bound to cout.
Size timestamp
Definition: LogStream.h:226
Stream buffer used by LogStream.
Definition: LogStream.h:104