Medical Imaging Interaction Toolkit  2018.4.99-12ad79a3
Medical Imaging Interaction Toolkit
mbilogBackendCout.cpp
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 #include <ctime>
14 #include <iomanip>
15 #include <list>
16 
17 #include "mbilogBackendCout.h"
18 
20 {
21  m_useFullOutput = false;
22 }
23 
25 {
26 }
27 
29 {
30  m_useFullOutput = full;
31 }
32 
34 {
35  if (m_useFullOutput)
36  FormatFull(l);
37  else
38  FormatSmart(l);
39 }
40 
41 mbilog::OutputType mbilog::BackendCout::GetOutputType() const
42 {
43  return mbilog::Console;
44 }
An object of this class represents a single logging message (logging event) of the mbi logging mechan...
OutputType GetOutputType() const override
void SetFull(bool full)
Sets the formatting mode. If true long messages will be displayed. Default is false (short/smart mess...
void ProcessMessage(const mbilog::LogMessage &l) override
This method is called by the mbi logging mechanism if the object is registered in the mbi logging mec...
void FormatFull(const LogMessage &l, int threadID=0)
Method formats the given LogMessage in the full/long format and writes it to std::cout.
void FormatSmart(const LogMessage &l, int threadID=0)
Method formats the given LogMessage in the smart/short format and writes it to std::cout.