ICF 3.1.1.10
Technical documentation of ICF Libraries
ILogger.h
Go to the documentation of this file.
1/********************************************************************************
2** This file is part of the ICF Framework. Copyright (C) Witold Gantzke & Kirill Lepskiy
3** ICF Framework may be used under the terms of the LGPL License v. 2.1 by the Free Software Foundation.
4********************************************************************************/
5
6#pragma once
7
8
9// Qt includes
10#include <QtCore/QString>
11
12// ICF includes
14
15
16namespace istd
17{
18
19
24class ILogger: virtual public IPolymorphic
25{
26public:
31 virtual bool IsLogConsumed(
32 const IInformationProvider::InformationCategory* categoryPtr = nullptr,
33 const int* flagsPtr = nullptr) const;
34
44 virtual bool SendLogMessage(
46 int id,
47 const QString& message,
48 const QString& messageSource,
49 int flags = 0) const;
50
51protected:
55 virtual void DecorateMessage(
57 int id,
58 int flags,
59 QString& message,
60 QString& messageSource) const;
61};
62
63
64// inline methods
65
67 const IInformationProvider::InformationCategory* /*categoryPtr*/,
68 const int* /*flagsPtr*/) const
69{
70 return false;
71}
72
73
76 int /*id*/,
77 const QString& /*message*/,
78 const QString& /*messageSource*/,
79 int /*flags*/) const
80{
81 return false;
82}
83
84
85// protected methods
86
89 int /*id*/,
90 int /*flags*/,
91 QString& /*message*/,
92 QString& /*messageSource*/) const
93{
94}
95
96
97} // namespace istd
98
99
InformationCategory
Category of information.
Common interface for classes sending some log info.
Definition ILogger.h:25
virtual bool IsLogConsumed(const IInformationProvider::InformationCategory *categoryPtr=nullptr, const int *flagsPtr=nullptr) const
Check if any log message is consumed.
Definition ILogger.h:66
virtual bool SendLogMessage(IInformationProvider::InformationCategory category, int id, const QString &message, const QString &messageSource, int flags=0) const
Send any message to log.
Definition ILogger.h:74
virtual void DecorateMessage(IInformationProvider::InformationCategory category, int id, int flags, QString &message, QString &messageSource) const
Decorate message parts before outputting.
Definition ILogger.h:87
Standard library.
Definition IComponent.h:17

© Witold Gantzke and Kirill Lepskiy