Extended error logging

Fixes #33
This commit is contained in:
Ivano Ras
2016-05-11 09:56:40 +01:00
committed by Thomas Krijnen
parent 3f5d30f497
commit 0253c1ddbe
6 changed files with 139 additions and 59 deletions
-22
View File
@@ -327,26 +327,4 @@ public:
virtual IfcWrite::IfcWritableEntity* isWritable() = 0;
};
class Logger {
public:
typedef enum { LOG_NOTICE, LOG_WARNING, LOG_ERROR } Severity;
private:
static std::ostream* log1;
static std::ostream* log2;
static std::stringstream log_stream;
static Severity verbosity;
static const char* severity_strings[];
public:
/// Determines to what stream respectively progress and errors are logged
static void SetOutput(std::ostream* l1, std::ostream* l2);
/// Determines the types of log messages to get logged
static void Verbosity(Severity v);
static Severity Verbosity();
/// Log a message to the output stream
static void Message(Severity type, const std::string& message, IfcAbstractEntity* entity=0);
static void Status(const std::string& message, bool new_line=true);
static void ProgressBar(int progress);
static std::string GetLog();
};
#endif