Medical Imaging Interaction Toolkit  2025.12.02
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 {
26  {
27  public:
28  ~LogBackendText() override;
29 
30  void ProcessMessage(const LogMessage& message) override = 0;
31 
32  protected:
38  void FormatSmart(const LogMessage& message, int threadID = 0);
39 
45  void FormatFull(const LogMessage& message, int threadID = 0);
46 
53  void FormatSmart(std::ostream& out, const LogMessage& message, int threadID = 0);
54 
61  void FormatFull(std::ostream& out, const LogMessage& message, int threadID = 0);
62 
65  void AppendTimeStamp(std::ostream& out);
66 
69  void FormatSmartWindows(const LogMessage& message, int /*threadID*/);
70  };
71 }
72 
73 #endif
#define MITKLOG_EXPORT
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)
Special variant of method FormatSmart which uses colored messages (only for Windows).
void ProcessMessage(const LogMessage &message) override=0
Called by the MITK log mechanism if the object is registered and a log message is emitted.
void FormatFull(std::ostream &out, const LogMessage &message, int threadID=0)
Format the given message in the full/long format and writes it to the given std::ostream.
void AppendTimeStamp(std::ostream &out)
Write system time to the given stream.
void FormatSmart(std::ostream &out, const LogMessage &message, int threadID=0)
Format the given message in the smart/short format and writes it to the given std::ostream.
void FormatSmart(const LogMessage &message, int threadID=0)
Format the given message in the smart/short format and writes it to std::cout.
void FormatFull(const LogMessage &message, int threadID=0)
Format the given message in the full/long format and writes 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.