diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:00:17 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:00:17 +0200 |
commit | fd0853d2623dd278b08288331ed42e3be59252fb (patch) | |
tree | a7645daeaef8bdbed064faf4eb88e72cee58726c /library/errorLogging.h | |
parent | 2.1 (diff) | |
download | FreeFileSync-fd0853d2623dd278b08288331ed42e3be59252fb.tar.gz FreeFileSync-fd0853d2623dd278b08288331ed42e3be59252fb.tar.bz2 FreeFileSync-fd0853d2623dd278b08288331ed42e3be59252fb.zip |
2.2
Diffstat (limited to 'library/errorLogging.h')
-rw-r--r-- | library/errorLogging.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/library/errorLogging.h b/library/errorLogging.h new file mode 100644 index 00000000..5fc5dacd --- /dev/null +++ b/library/errorLogging.h @@ -0,0 +1,43 @@ +#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 logError(const wxString& errorMessage); + void logWarning(const wxString& warningMessage); + void logInfo(const wxString& infoMessage); + + int errorsTotal() + { + return errorCount; + } + + const std::vector<wxString>& getFormattedMessages() + { + 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 |