Medical Imaging Interaction Toolkit  2016.11.0
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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef _mbilogTextBackendBase_H
18 #define _mbilogTextBackendBase_H
19 
20 #include "mbilogBackendBase.h"
21 #include "mbilogExports.h"
22 
23 namespace mbilog
24 {
33  {
34  public:
35  virtual ~TextBackendBase();
36 
43  virtual void ProcessMessage(const mbilog::LogMessage &logMessage) = 0;
44 
45  protected:
49  void FormatSmart(const LogMessage &l, int threadID = 0);
50 
54  void FormatFull(const LogMessage &l, int threadID = 0);
55 
59  void FormatSmart(std::ostream &out, const LogMessage &l, int threadID = 0);
60 
64  void FormatFull(std::ostream &out, const LogMessage &l, int threadID = 0);
65 
67  void AppendTimeStamp(std::ostream &out);
68 
70  // TODO: implement for linux?
71  void FormatSmartWindows(const mbilog::LogMessage &l, int /*threadID*/);
72  };
73 }
74 
75 #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...