blob: 24b4a9921a0f6eb2c66afd4c9a335e957ffba139 (
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
|
#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;
}
const std::vector<wxString>& getFormattedMessages() const
{
return formattedMessages;
}
size_t messageCount()
{
return formattedMessages.size();
}
private:
wxString assembleMessage(const wxString& prefix, const wxString& message);
std::vector<wxString> formattedMessages; //list of non-resolved errors and warnings
int errorCount;
};
}
#endif // ERRORLOGGING_H_INCLUDED
|