X-Git-Url: https://git.teslayout.com/public/public/public/?p=anna.git;a=blobdiff_plain;f=source%2Fcore%2Ftracing%2FLogger.cpp;fp=source%2Fcore%2Ftracing%2FLogger.cpp;h=c8b7ec4778bf9f85362dcbe5103ed51b2ad21504;hp=608b9272545ea5e3e2cbbb7a46053cb9d8c97ff2;hb=5a6cba5fde2b2f538a7515f8293cc0a8d9589dfa;hpb=af9c86ffb0e28d35ad94d99c5f77e41578c972b4 diff --git a/source/core/tracing/Logger.cpp b/source/core/tracing/Logger.cpp index 608b927..c8b7ec4 100644 --- a/source/core/tracing/Logger.cpp +++ b/source/core/tracing/Logger.cpp @@ -32,7 +32,7 @@ Logger::Level Logger::st_level(Logger::Warning); NRMutex Logger::st_mutex; void Logger::initialize(const char* ident) -throw() { +{ if(st_writer == NULL) { st_writer = new TraceLogger; st_writer->initialize(ident); @@ -40,7 +40,7 @@ throw() { } void Logger::initialize(const char* ident, Writer* writer) -throw() { +{ if(st_writer == NULL && writer != NULL) { writer->initialize(ident); st_writer = writer; @@ -48,7 +48,7 @@ throw() { } void Logger::showPID(const bool show) -throw() { +{ #ifndef _MT if(show == true) { @@ -61,7 +61,7 @@ throw() { } void Logger::write(const Level level, const char* text, const char* fromFile, const int fromLine) -throw() { +{ #ifndef _MT if(isActive(level) && st_writer != NULL) { @@ -80,7 +80,7 @@ throw() { } void Logger::write(const Level level, const char* text, const char* value, const char* fromFile, const int fromLine) -throw() { +{ #ifndef _MT if(isActive(level) && st_writer != NULL) { @@ -99,7 +99,7 @@ throw() { } void Logger::write(const Level level, const char* text, const int value, const char* fromFile, const int fromLine) -throw() { +{ #ifndef _MT if(isActive(level) && st_writer != NULL) { @@ -118,7 +118,7 @@ throw() { } void Logger::write(const Level level, const char* text, const DataBlock& value, const char* fromFile, const int fromLine) -throw() { +{ if(isActive(level) && st_writer != NULL) { #ifndef _MT @@ -141,21 +141,21 @@ throw() { } void Logger::disable() -throw(RuntimeException) { +noexcept(false) { st_mutex.lock(); st_enabled = false; st_mutex.unlock(); } void Logger::enable() -throw(RuntimeException) { +noexcept(false) { st_mutex.lock(); st_enabled = true; st_mutex.unlock(); } Logger::Level Logger::asLevel(const char* stringLevel) -throw(RuntimeException) { +noexcept(false) { static struct { const char* stringLevel; const Level level; @@ -192,7 +192,7 @@ throw(RuntimeException) { } const char* Logger::asString(const Level level) -throw() { +{ static const char* levels [] = { "Emergency", "Alert", "Critical", "Error", "Warning", "Notice", "Information", "Debug" };