Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkLogBackendText.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef mitkLogBackendText_h
14 #define mitkLogBackendText_h
15 
16 #include <mitkLogBackendBase.h>
17 
18 namespace mitk
19 {
40  {
41  public:
42  ~LogBackendText() override;
43 
44  void ProcessMessage(const LogMessage& message) override = 0;
45 
46  protected:
58  void FormatSmart(const LogMessage& message, int threadID = 0);
59 
68  void FormatFull(const LogMessage& message, int threadID = 0);
69 
81  void FormatSmart(std::ostream& out, const LogMessage& message, int threadID = 0);
82 
92  void FormatFull(std::ostream& out, const LogMessage& message, int threadID = 0);
93 
101  void AppendTimeStamp(std::ostream& out);
102 
112  void FormatSmartWindows(const LogMessage& message, int threadID);
113  };
114 }
115 
116 #endif
#define MITKLOG_EXPORT
Abstract interface for log backends that can be registered in the MITK log mechanism.
Abstract superclass for text-based log backends.
void FormatSmartWindows(const LogMessage &message, int threadID)
Format a message in smart/short format with colored Windows console output.
void ProcessMessage(const LogMessage &message) override=0
Process a log message.
void FormatFull(std::ostream &out, const LogMessage &message, int threadID=0)
Format the given message in full/long format and write it to the given stream.
void AppendTimeStamp(std::ostream &out)
Append the current wall-clock time to the given stream.
void FormatSmart(std::ostream &out, const LogMessage &message, int threadID=0)
Format the given message in smart/short format and write it to the given stream.
void FormatSmart(const LogMessage &message, int threadID=0)
Format the given message in smart/short format and write it to std::cout.
void FormatFull(const LogMessage &message, int threadID=0)
Format the given message in full/long format and write it to std::cout.
~LogBackendText() override
Find image slices visible on a given plane.
A single log message (log event) of the MITK log mechanism.