DtkCore
DTK Core module
AbstractAppender.h
1
/*
2
Copyright (c) 2010 Boris Moiseev (cyberbobs at gmail dot com)
3
4
This program is free software: you can redistribute it and/or modify
5
it under the terms of the GNU Lesser General Public License version 2.1
6
as published by the Free Software Foundation and appearing in the file
7
LICENSE.LGPL included in the packaging of this file.
8
9
This program is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
GNU Lesser General Public License for more details.
13
*/
14
#ifndef ABSTRACTAPPENDER_H
15
#define ABSTRACTAPPENDER_H
16
17
// Local
18
#include "CuteLogger_global.h"
19
#include <Logger.h>
20
21
// Qt
22
#include <QMutex>
23
24
DCORE_BEGIN_NAMESPACE
25
26
class
CUTELOGGERSHARED_EXPORT
AbstractAppender
27
{
28
public
:
29
AbstractAppender
();
30
virtual
~AbstractAppender
();
31
32
Logger::LogLevel
detailsLevel()
const
;
33
void
setDetailsLevel(
Logger::LogLevel
level);
34
void
setDetailsLevel(
const
QString &level);
35
36
void
write(
const
QDateTime &timeStamp,
Logger::LogLevel
logLevel,
const
char
*file,
int
line,
const
char
*function,
37
const
QString &category,
const
QString &message);
38
39
protected
:
40
virtual
void
append
(
const
QDateTime &timeStamp,
Logger::LogLevel
logLevel,
const
char
*file,
int
line,
41
const
char
*function,
const
QString &category,
const
QString &message) = 0;
42
43
private
:
44
QMutex m_writeMutex;
45
46
Logger::LogLevel
m_detailsLevel;
47
mutable
QMutex m_detailsLevelMutex;
48
};
49
50
DCORE_END_NAMESPACE
51
52
#endif
// ABSTRACTAPPENDER_H
Dtk::Core::AbstractAppender
The AbstractAppender class provides an abstract base class for writing a log entries.
Definition:
AbstractAppender.h:27
Dtk::Core::AbstractAppender::append
virtual void append(const QDateTime &timeStamp, Logger::LogLevel logLevel, const char *file, int line, const char *function, const QString &category, const QString &message)=0
Writes the log record to the logger instance
Dtk::Core::Logger::LogLevel
LogLevel
Describes the possible severity levels of the log records
Definition:
Logger.h:83
src
log
AbstractAppender.h
文档生成时间:2022-12-28-07:03 +00
Doxygen Version
1.9.4
制作者:deepin doc doc go SIG
文档使用CC-BY-4.0共享