blob: 6b27e1c15b6b1396121a20e358066db150785803 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) *
// **************************************************************************
//
#ifndef ERRORLOGGING_H_INCLUDED
#define ERRORLOGGING_H_INCLUDED
#include <wx/string.h>
#include <vector>
class Zstring;
namespace FreeFileSync
{
class ErrorLogging
{
public:
ErrorLogging() : errorCount(0) {}
void logInfo( const wxString& infoMessage);
void logWarning( const wxString& warningMessage);
void logError( const wxString& errorMessage);
void logFatalError(const wxString& errorMessage);
int errorsTotal()
{
return errorCount;
}
typedef std::vector<wxString> MessageEntry;
const MessageEntry& getFormattedMessages() const
{
return formattedMessages;
}
private:
wxString assembleMessage(const wxString& prefix, const wxString& message);
MessageEntry formattedMessages; //list of non-resolved errors and warnings
int errorCount;
};
}
#endif // ERRORLOGGING_H_INCLUDED
|