Akonadi

filetracer.h
1 /***************************************************************************
2  * SPDX-FileCopyrightText: 2006 Tobias Koenig <[email protected]> *
3  * *
4  * SPDX-License-Identifier: LGPL-2.0-or-later *
5  ***************************************************************************/
6 
7 #pragma once
8 
9 #include "tracerinterface.h"
10 
11 #include <QFile>
12 
13 namespace Akonadi
14 {
15 namespace Server
16 {
17 /**
18  * A tracer which forwards all tracing information to a
19  * log file.
20  */
21 class FileTracer : public TracerInterface
22 {
23 public:
24  explicit FileTracer(const QString &fileName);
25  ~FileTracer() override;
26 
27  void beginConnection(const QString &identifier, const QString &msg) override;
28  void endConnection(const QString &identifier, const QString &msg) override;
29  void connectionInput(const QString &identifier, const QByteArray &msg) override;
30  void connectionOutput(const QString &identifier, const QByteArray &msg) override;
31  void signal(const QString &signalName, const QString &msg) override;
32  void warning(const QString &componentName, const QString &msg) override;
33  void error(const QString &componentName, const QString &msg) override;
34 
35 private:
36  void output(const QString &id, const QString &msg);
37 
38  QFile m_file;
39 };
40 
41 } // namespace Server
42 } // namespace Akonadi
43 
void signal(const QString &signalName, const QString &msg) override
This method is called whenever a dbus signal is emitted on the bus.
Definition: filetracer.cpp:40
void connectionOutput(const QString &identifier, const QByteArray &msg) override
This method is called whenever the akonadi server sends some data out to a client.
Definition: filetracer.cpp:35
void connectionInput(const QString &identifier, const QByteArray &msg) override
This method is called whenever the akonadi server retrieves some data from the outside.
Definition: filetracer.cpp:30
void beginConnection(const QString &identifier, const QString &msg) override
This method is called whenever a new data (imap) connection to the akonadi server is established.
Definition: filetracer.cpp:20
void warning(const QString &componentName, const QString &msg) override
This method is called whenever a component wants to output a warning.
Definition: filetracer.cpp:45
void endConnection(const QString &identifier, const QString &msg) override
This method is called whenever a data (imap) connection to akonadi server is closed.
Definition: filetracer.cpp:25
void error(const QString &componentName, const QString &msg) override
This method is called whenever a component wants to output an error.
Definition: filetracer.cpp:50
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sat Jun 25 2022 06:00:32 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.