Medical Imaging Interaction Toolkit  2021.02.99-b1c7fb9e
Medical Imaging Interaction Toolkit
mbilogTextBackendBase.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 _mbilogTextBackendBase_H
14 #define _mbilogTextBackendBase_H
15 
16 #include "mbilogBackendBase.h"
17 #include "mbilogExports.h"
18 
19 namespace mbilog
20 {
29  {
30  public:
31  ~TextBackendBase() override;
32 
39  void ProcessMessage(const mbilog::LogMessage &logMessage) override = 0;
40 
41  protected:
46  void FormatSmart(const LogMessage &l, int threadID = 0);
47 
52  void FormatFull(const LogMessage &l, int threadID = 0);
53 
59  void FormatSmart(std::ostream &out, const LogMessage &l, int threadID = 0);
60 
66  void FormatFull(std::ostream &out, const LogMessage &l, int threadID = 0);
67 
69  void AppendTimeStamp(std::ostream &out);
70 
72  // TODO: implement for linux?
73  void FormatSmartWindows(const mbilog::LogMessage &l, int /*threadID*/);
74  };
75 }
76 
77 #endif
#define MBILOG_EXPORT
Definition: mbilogExports.h:15
An object of this class represents a single logging message (logging event) of the mbi logging mechan...
This class is an abstract superclass for logging text backends. It adds string formatting methods to ...
This class is an interface for logging backends that can be registered in the mbi logging mechanism...
Definition: mbilog.h:25