Debian Codegraph @

Source/Logger/COREFilePrintLogObserver.h

raw
1 /*
2 * Copyright (C) 2013-2015, 2019 by the Konclude Developer Team.
3 *
4 * This file is part of the reasoning system Konclude.
5 * For details and support, see <http://konclude.com/>.
6 *
7 * Konclude is free software: you can redistribute it and/or modify
8 * it under the terms of version 3 of the GNU Lesser General Public
9 * License (LGPLv3) as published by the Free Software Foundation.
10 *
11 * Konclude is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU (Lesser) General Public License for more details.
15 *
16 * You should have received a copy of the GNU (Lesser) General Public
17 * License along with Konclude. If not, see <http://www.gnu.org/licenses/>.
18 *
19 */
20
21 #ifndef KONCLUDE_LOGGER_COREFILEPRINTLOGOBSERVER_H
22 #define KONCLUDE_LOGGER_COREFILEPRINTLOGOBSERVER_H
23
24
25 // Libraries includes
26 #include <QSet>
27 #include <QStringList>
28 #include <QFile>
29 #include <QDir>
30
31 // Namespace includes
32 #include "CAbstractLogObserver.h"
33 #include "CLogger.h"
34
35
36 // Other includes
37 #include <iostream>
38
39
40 // Logger includes
41
42
43 namespace Konclude {
44
45 namespace Logger {
46
47
48 /*!
49 *
50 * \class COREFilePrintLogObserver
51 * \author Andreas Steigmiller
52 * \version 0.1
53 * \brief TODO
54 *
55 */
56 class COREFilePrintLogObserver : public CAbstractLogObserver {
57
58 public:
59 COREFilePrintLogObserver(const QString& outputFileString);
60 virtual ~COREFilePrintLogObserver();
61
62 virtual void postLogMessage(CLogMessage *message);
63
64 void flushLogging();
65 void closeOutputFile();
66 void forcedPathCreated(const QString& filePath);
67
68
69 private:
70 QString mOutputFileString;
71 QFile mOutputFile;
72 bool mOutputFileOpened;
73 double mMinLogLevel;
74 double mMaxLogLevel;
75
76 };
77
78 }; // end namespace Logger
79
80 }; // end namespace Konclude
81
82 #endif // KONCLUDE_LOGGER_COREFILEPRINTLOGOBSERVER_H