Belle II Software  release-08-01-10
LogConnectionBase.h
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 
9 #pragma once
10 
11 namespace Belle2 {
16  class LogMessage;
17 
22 
23  public:
24 
27 
29  virtual ~LogConnectionBase() {}
30 
37  virtual bool sendMessage(const LogMessage& message) = 0;
38 
44  virtual bool isConnected() = 0;
45 
48  virtual void finalizeOnAbort() {}
49  };
50 
52 } // end namespace Belle2
Abstract base class for the different types of log connections.
virtual bool isConnected()=0
Returns true if the connection could be established.
LogConnectionBase()
The LogConnectionBase default constructor.
virtual bool sendMessage(const LogMessage &message)=0
Sends a log message.
virtual void finalizeOnAbort()
Called just before the system exists after a fatal error.
virtual ~LogConnectionBase()
The LogConnectionBase destructor.
The LogMessage class.
Definition: LogMessage.h:29
Abstract base class for different kinds of events.