[nemiver/better-variable-format: 6/10] NMV_DEFAULT_LOG_DOMAIN is always file base name
- From: Dodji Seketeli <dodji src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nemiver/better-variable-format: 6/10] NMV_DEFAULT_LOG_DOMAIN is always file base name
- Date: Mon, 28 Feb 2011 00:19:13 +0000 (UTC)
commit e8c26f6d9438ec619edef7df6d39eebf8aff14b7
Author: Dodji Seketeli <dodji seketeli org>
Date: Fri Feb 25 22:30:32 2011 +0100
NMV_DEFAULT_LOG_DOMAIN is always file base name
* src/common/nmv-log-stream.h (NMV_DEFAULT_DOMAIN): Always return
file base name.
src/common/nmv-log-stream.h | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/common/nmv-log-stream.h b/src/common/nmv-log-stream.h
index 5de3f34..6f26144 100644
--- a/src/common/nmv-log-stream.h
+++ b/src/common/nmv-log-stream.h
@@ -36,7 +36,11 @@
#include "nmv-api-macros.h"
#ifndef NMV_DEFAULT_DOMAIN
-#define NMV_DEFAULT_DOMAIN __FILE__
+#define NMV_DEFAULT_DOMAIN __extension__ \
+ ({ \
+ const char* path = __FILE__; \
+ Glib::path_get_basename (path); \
+ })
#endif
#ifndef NMV_GENERAL_DOMAIN
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]