diff OrthancServer/Resources/Samples/CppHelpers/Logging/OrthancLogger.cpp @ 4044:d25f4c0fa160 framework

splitting code into OrthancFramework and OrthancServer
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 10 Jun 2020 20:30:34 +0200
parents Resources/Samples/CppHelpers/Logging/OrthancLogger.cpp@fbe22748cd9c
children c847b0dfd255
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/OrthancServer/Resources/Samples/CppHelpers/Logging/OrthancLogger.cpp	Wed Jun 10 20:30:34 2020 +0200
@@ -0,0 +1,46 @@
+#include "OrthancLogger.h"
+#include "Logging.h"
+
+namespace OrthancHelpers
+{
+
+  void OrthancLogger::Trace(const char *message)
+  {
+    VLOG(1) << GetContext() << " " << message;
+  }
+
+  void OrthancLogger::Trace(const std::string& message)
+  {
+    VLOG(1) << GetContext() << " " << message;
+  }
+
+  void OrthancLogger::Info(const char *message)
+  {
+    LOG(INFO) << GetContext() << " " << message;
+  }
+
+  void OrthancLogger::Info(const std::string& message)
+  {
+    LOG(INFO) << GetContext() << " " << message;
+  }
+
+  void OrthancLogger::Warning(const char *message)
+  {
+    LOG(WARNING) << GetContext() << " " << message;
+  }
+
+  void OrthancLogger::Warning(const std::string& message)
+  {
+    LOG(WARNING) << GetContext() << " " << message;
+  }
+
+  void OrthancLogger::Error(const char *message)
+  {
+    LOG(ERROR) << GetContext() << " " << message;
+  }
+
+  void OrthancLogger::Error(const std::string& message)
+  {
+    LOG(ERROR) << GetContext() << " " << message;
+  }
+}