Belle II Software development
LogConnectionJSON.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#include <framework/logging/LogConnectionConsole.h>
12
13namespace Belle2 {
18
27
28 public:
29
34 explicit LogConnectionJSON(bool complete = false);
35
37 ~LogConnectionJSON() override = default;
38
45 bool sendMessage(const LogMessage& message) override;
46
50 bool isConnected() override { return m_console.isConnected(); }
51
53 void finalizeOnAbort() override
54 {
55 m_console.finalizeOnAbort();
56 }
57
58 private:
63 };
64
66} // end namespace Belle2
LogConnectionBase()
The LogConnectionBase default constructor.
Implements a log connection to an IO Stream.
LogConnectionConsole m_console
LogConnection to the console we use to dispatch the json objects.
bool m_complete
If true ignore the log message format settings and output everything.
bool isConnected() override
Returns true if the connection to the text file could be established.
~LogConnectionJSON() override=default
The LogConnectionJSONFile destructor.
void finalizeOnAbort() override
Finalize on Abort: make sure that connected connection is finalized.
The LogMessage class.
Definition LogMessage.h:29
LogConnectionJSON(bool complete=false)
The constructor.
bool sendMessage(const LogMessage &message) override
Sends a log message.
Abstract base class for different kinds of events.