Akonadi

filetracer.h
1/***************************************************************************
2 * SPDX-FileCopyrightText: 2006 Tobias Koenig <tokoe@kde.org> *
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
13namespace Akonadi
14{
15namespace Server
16{
17/**
18 * A tracer which forwards all tracing information to a
19 * log file.
20 */
22{
23public:
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
35private:
36 void output(const QString &id, const QString &msg);
37
38 QFile m_file;
39};
40
41} // namespace Server
42} // namespace Akonadi
A tracer which forwards all tracing information to a log file.
Definition filetracer.h:22
void warning(const QString &componentName, const QString &msg) override
This method is called whenever a component wants to output a warning.
void error(const QString &componentName, const QString &msg) override
This method is called whenever a component wants to output an error.
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.
void endConnection(const QString &identifier, const QString &msg) override
This method is called whenever a data (imap) connection to akonadi server is closed.
void signal(const QString &signalName, const QString &msg) override
This method is called whenever a dbus signal is emitted on the bus.
void connectionInput(const QString &identifier, const QByteArray &msg) override
This method is called whenever the akonadi server retrieves some data from the outside.
void connectionOutput(const QString &identifier, const QByteArray &msg) override
This method is called whenever the akonadi server sends some data out to a client.
This interface can be reimplemented to deliver tracing information of the akonadi server to the outsi...
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:03:34 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.