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 */
21class FileTracer : public TracerInterface
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
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.
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:49:57 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.