Fix file name to short version
authorWonYoung Choi <wy80.choi@samsung.com>
Fri, 8 May 2015 08:14:26 +0000 (17:14 +0900)
committerWonYoung Choi <wy80.choi@samsung.com>
Fri, 8 May 2015 08:14:26 +0000 (17:14 +0900)
Change-Id: I8c93f57d65c1ee1dba1a9ce3aecf253e8578fdcd

src/common/logger.h

index 7d59ef2..50f0eab 100644 (file)
@@ -56,10 +56,15 @@ class LogMessage {
 }  // namespace utils
 }  // namespace wrt
 
+#ifndef __MODULE__
+#define __MODULE__                                                            \
+    (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)
+#endif
+
 #define LOGGER(severity)                                                      \
   wrt::utils::LogMessageVodify() &                                            \
     wrt::utils::LogMessage(DLOG_ ## severity,                                 \
-                           __FILE__, __FUNCTION__, __LINE__).stream()
+                           __MODULE__, __FUNCTION__, __LINE__).stream()
 
 
 #endif  // WRT_COMMON_LOGGER_H_