From f2e1c50081e66b7962c707de90378ac9209070bc Mon Sep 17 00:00:00 2001
From: Tom Rondeau <trondeau@vt.edu>
Date: Wed, 13 Mar 2013 15:36:26 -0400
Subject: log: replacing log4cxx with log4cpp.

---
 docs/doxygen/other/logger.dox | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

(limited to 'docs/doxygen/other/logger.dox')

diff --git a/docs/doxygen/other/logger.dox b/docs/doxygen/other/logger.dox
index f98a64657b..e0f8ac4965 100644
--- a/docs/doxygen/other/logger.dox
+++ b/docs/doxygen/other/logger.dox
@@ -4,20 +4,23 @@
 
 GNU Radio has a logging interface to enable various levels of logging
 information to be printed to the console or a file. The logger derives
-from log4cxx (http://logging.apache.org/log4cxx) which is readily
+from log4cpp (http://log4cpp.sourceforge.net/) which is readily
 available in most Linux distributions. This is an optional dependency
 and GNU Radio will work without it.
 
 When configuring GNU Radio, the -DENABLE_GR_LOG=On|Off option to cmake
 will allow the user to toggle use of the logger on and off. The logger
-defaults to "on" and will use log4cxx if it is available. If log4cxx
+defaults to "on" and will use log4cpp if it is available. If log4cpp
 is not found, the default logging will output to standard output or
 standard error, depending on the level of the log message.
 
 Logging is useful for blocks to print out certain amounts of data at
 different levels. These levels are:
 
-    TRACE < DEBUG < INFO < WARN < ERROR < FATAL
+<pre>
+    DEBUG < INFO < WARN < TRACE < ERROR < ALERT < CRIT < FATAL <EMERG
+</pre>
+
 
 The order here determines the level of output. These levels are
 hierarchical in that specifying any level also includes any level
@@ -123,7 +126,7 @@ simple examples of using them:
 
 If the logger is not enabled, then these macros become nops and do
 nothing (and d_logger and d_debug_logger are NULL pointers). If
-logging is enabled but the log4cxx library is not found, then TRACE,
+logging is enabled but the log4cpp library is not found, then TRACE,
 DEBUG, and INFO levels go to stdout and the rest to stderr.
 
 
@@ -133,11 +136,10 @@ If not using the simplified settings discussed above, where we can
 direct the logger messages to either a file or one of the standard
 outputs, we must use a more complicated configuration file. We do this
 by specifying the "log_config" option in the [LOG] section. The
-log4cxx documentation (found through
-http://logging.apache.org/log4cxx/) will provide more information on
-how configuration works and looks. Mostly, a default configuration
-script provided with GNU Radio can be used. After installation, the
-default configuration script is located at:
+log4cpp documentation will provide more information on how
+configuration works and looks. Mostly, a default configuration script
+provided with GNU Radio can be used. After installation, the default
+configuration script is located at:
 
 <pre>
     $prefix/etc/gnuradio/gr_log_default.xml
@@ -196,7 +198,7 @@ except we would use "gr_log_debug." in the GR_LOG_GETLOGGER call):
 \endcode
 
 This creates a pointer called LOG (which is instantiated as a
-log4cxx:LoggerPtr in the macro) that we can now use locally as the
+log4cpp:LoggerPtr in the macro) that we can now use locally as the
 input to our logging macros like 'GR_LOG_TRACE(LOG, "message")'.
 
 */
-- 
cgit v1.2.3


From 8b946999a7e332249236d7317a76fdd8d3387dc7 Mon Sep 17 00:00:00 2001
From: Tom Rondeau <trondeau@vt.edu>
Date: Wed, 13 Mar 2013 17:43:16 -0400
Subject: log: fixes to replace log4cxx with log4cpp.

---
 CMakeLists.txt                                |  3 --
 cmake/Modules/FindLog4cpp.cmake               | 23 ++++++--------
 cmake/Modules/GrMiscUtils.cmake               |  2 --
 docs/doxygen/other/logger.dox                 | 25 ++++++++-------
 gnuradio-core/CMakeLists.txt                  |  1 -
 gnuradio-core/gnuradio-core.conf.in           |  6 ++--
 gnuradio-core/src/lib/CMakeLists.txt          |  3 --
 gnuradio-core/src/lib/runtime/gr_logger.h     | 46 +++++++++++++--------------
 gnuradio-core/src/lib/runtime/qa_gr_logger.cc | 13 ++++----
 9 files changed, 54 insertions(+), 68 deletions(-)

(limited to 'docs/doxygen/other/logger.dox')

diff --git a/CMakeLists.txt b/CMakeLists.txt
index edfd269a2e..2c0a4e9096 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -231,10 +231,7 @@ endif(ENABLE_VOLK)
 
 # Handle gr_log enable/disable
 GR_LOGGING()
-set(LOG4CPP_LIBRARIES ${LOG4CPP_LIBRARY})
-message("First Libs: ${LOG4CPP_LIBRARIES}")
 
-message("First Lib: ${LOG4CPP_LIBRARY}")
 ########################################################################
 # Distribute the README file
 ########################################################################
diff --git a/cmake/Modules/FindLog4cpp.cmake b/cmake/Modules/FindLog4cpp.cmake
index 0b7208630f..fc314c61a5 100644
--- a/cmake/Modules/FindLog4cpp.cmake
+++ b/cmake/Modules/FindLog4cpp.cmake
@@ -23,19 +23,17 @@ find_library(LOG4CPP_LIBRARY
   PATHS /usr/lib /usr/local/lib /opt/local/lib
 )
 
-message("#####################")
-message("LOG INCLEUDE :${LOG4CPP_INCLUDE_DIR}")
-message("LOG LIBRARY :${LOG4CPP_LIBRARY}")
-
-
-message("#####################")
 
 if (LOG4CPP_INCLUDE_DIR AND LOG4CPP_LIBRARY)
   set(LOG4CPP_FOUND TRUE)
-  set(LOG4CPP_LIBRARIES ${LOG4CPP_LIBRARY} )
+  set(LOG4CPP_LIBRARIES ${LOG4CPP_LIBRARY} CACHE INTERNAL "" FORCE)
+  set(LOG4CPP_INCLUDE_DIRS ${LOG4CPP_INCLUDE_DIR} CACHE INTERNAL "" FORCE)
 else ()
-  set(LOG4CPP_FOUND FALSE)
-  set(LOG4CPP_LIBRARIES )
+  set(LOG4CPP_FOUND FALSE CACHE INTERNAL "" FORCE)
+  set(LOG4CPP_LIBRARY "" CACHE INTERNAL "" FORCE)
+  set(LOG4CPP_LIBRARIES "" CACHE INTERNAL "" FORCE)
+  set(LOG4CPP_INCLUDE_DIR "" CACHE INTERNAL "" FORCE)
+  set(LOG4CPP_INCLUDE_DIRS "" CACHE INTERNAL "" FORCE)
 endif ()
 
 if (LOG4CPP_FOUND)
@@ -49,10 +47,7 @@ else ()
   endif ()
 endif ()
 
-message("internal libs: ${LOG4CPP_LIBRARIES}")
-
 mark_as_advanced(
-  LOG4CPP_LIBRARY
   LOG4CPP_LIBRARIES
-  LOG4CPP_INCLUDE_DIR
-  )
+  LOG4CPP_INCLUDE_DIRS
+)
diff --git a/cmake/Modules/GrMiscUtils.cmake b/cmake/Modules/GrMiscUtils.cmake
index 65b0b5a8c8..69ff1f5ddc 100644
--- a/cmake/Modules/GrMiscUtils.cmake
+++ b/cmake/Modules/GrMiscUtils.cmake
@@ -220,8 +220,6 @@ endfunction(GR_GEN_TARGET_DEPS)
 function(GR_LOGGING)
   find_package(Log4cpp)
 
-  message(STATUS "LOG4CPP_LIBRARIES First set to ${LOG4CPP_LIBRARIES}.")
-
   OPTION(ENABLE_GR_LOG "Use gr_logger" ON)
   if(ENABLE_GR_LOG)
     # If gr_logger is enabled, make it usable
diff --git a/docs/doxygen/other/logger.dox b/docs/doxygen/other/logger.dox
index e0f8ac4965..9a97172ed0 100644
--- a/docs/doxygen/other/logger.dox
+++ b/docs/doxygen/other/logger.dox
@@ -18,7 +18,7 @@ Logging is useful for blocks to print out certain amounts of data at
 different levels. These levels are:
 
 <pre>
-    DEBUG < INFO < WARN < TRACE < ERROR < ALERT < CRIT < FATAL <EMERG
+    DEBUG < INFO < WARN < TRACE < ERROR < ALERT < CRIT < FATAL < EMERG
 </pre>
 
 
@@ -45,14 +45,14 @@ stream or file.
 The four main configure options are:
 
 <pre>
-  log_level = all
-  debug_level = all
+  log_level = debug
+  debug_level = debug
   log_file = stdout
   debug_file = stderr
 </pre>
 
 This establishes the two loggers as having access to all levels of
-logging events (TRACE through FATAL). They are also configured not to
+logging events (DEBUG through EMERG). They are also configured not to
 use files but instead output to the console. The standard logger will
 output to standard out while the debug logger outputs to standard
 error.
@@ -114,20 +114,21 @@ The various logging macros are defined in gr_logger.h. Here are some
 simple examples of using them:
 
 \code
-  GR_LOG_TRACE(LOG, "TRACE message");
   GR_LOG_DEBUG(LOG, "DEBUG message");
   GR_LOG_INFO(LOG, "INFO message");
+  GR_LOG_NOTICE(LOG, "NOTICE message");
   GR_LOG_WARN(LOG, "WARNING message");
   GR_LOG_ERROR(LOG, "ERROR message");
-  GR_FATAL(LOG, "FATAL message");
-  GR_ERRORIF(LOG, a>b, "CONDITIONAL ERROR message");
-  GR_ASSERT(LOG, a>b, "ASSERT error message");
+  GR_LOG_CRIT(LOG, "CRIT message");
+  GR_LOG_ALERT(LOG, "ALERT message");
+  GR_LOG_FATAL(LOG, "FATAL message");
+  GR_LOG_EMERG(LOG, "EMERG message");
 \endcode
 
 If the logger is not enabled, then these macros become nops and do
 nothing (and d_logger and d_debug_logger are NULL pointers). If
 logging is enabled but the log4cpp library is not found, then TRACE,
-DEBUG, and INFO levels go to stdout and the rest to stderr.
+INFO, and NOTICE levels go to stdout and the rest to stderr.
 
 
 \subsection adv_config Advanced Configuration Options
@@ -151,7 +152,7 @@ For the following examples, we will assume that our local
 \code
 [LOG]
 log_config = /opt/gr/etc/gnuadio/gr_log_default.xml
-log_level = All
+log_level = debug
 debug_level = Off
 \endcode
 
@@ -165,7 +166,7 @@ specified in the XML file. Here, we have turned on the standard logger
 (d_debug_logger). So even if the debug logger is used in the code, it
 will not actually output any information. Conversely, any level of
 output passed to the standard logger will output because we have
-turned this value to "all."
+turned this value to the lowest level "debug."
 
 If both an XML configuration file is set and the "log_file" or
 "debug_file" options are set at the same time, both systems are
@@ -199,6 +200,6 @@ except we would use "gr_log_debug." in the GR_LOG_GETLOGGER call):
 
 This creates a pointer called LOG (which is instantiated as a
 log4cpp:LoggerPtr in the macro) that we can now use locally as the
-input to our logging macros like 'GR_LOG_TRACE(LOG, "message")'.
+input to our logging macros like 'GR_LOG_INFO(LOG, "message")'.
 
 */
diff --git a/gnuradio-core/CMakeLists.txt b/gnuradio-core/CMakeLists.txt
index 97ca11e0a9..97e94cbc16 100644
--- a/gnuradio-core/CMakeLists.txt
+++ b/gnuradio-core/CMakeLists.txt
@@ -63,7 +63,6 @@ GR_SET_GLOBAL(GNURADIO_CORE_INCLUDE_DIRS
 )
 
 list(APPEND GNURADIO_CORE_INCLUDE_DIRS ${CMAKE_BINARY_DIR})
-message("GNURADIO_CORE_INCLUDE_DIRS ARE: ${GNURADIO_CORE_INCLUDE_DIRS}")
 
 GR_SET_GLOBAL(GNURADIO_CORE_SWIG_INCLUDE_DIRS
     ${GNURADIO_CORE_INCLUDE_DIRS}
diff --git a/gnuradio-core/gnuradio-core.conf.in b/gnuradio-core/gnuradio-core.conf.in
index 4de97e1ea5..25abedb253 100644
--- a/gnuradio-core/gnuradio-core.conf.in
+++ b/gnuradio-core/gnuradio-core.conf.in
@@ -12,9 +12,9 @@ max_messages = 100
 
 [LOG]
 # Levels can be (case insensitive):
-#   trace, debug, info, warn, error, fatal
-log_level = all
-debug_level = all
+#       DEBUG, INFO, WARN, TRACE, ERROR, ALERT, CRIT, FATAL, EMERG
+log_level = debug
+debug_level = emerg
 
 # These file names can either be 'stdout' to output to standard output
 # or 'stderr' to output to standard error. Any other string will
diff --git a/gnuradio-core/src/lib/CMakeLists.txt b/gnuradio-core/src/lib/CMakeLists.txt
index b69b858ad0..da6de8ed1b 100644
--- a/gnuradio-core/src/lib/CMakeLists.txt
+++ b/gnuradio-core/src/lib/CMakeLists.txt
@@ -82,9 +82,6 @@ link_directories(${LOG4CPP_LIBRARY_DIRS})
 #if(LOG4CPP_FOUND)
 #    add_definitions(-DENABLE_GR_LOG)
 #endif(LOG4CPP_FOUND)
-message("******************************************")
-message("LOG4CPP LIBRARIES are ${LOG4CPP_LIBRARIES}")
-message("******************************************")
 
 list(APPEND gnuradio_core_libs
     gruel
diff --git a/gnuradio-core/src/lib/runtime/gr_logger.h b/gnuradio-core/src/lib/runtime/gr_logger.h
index 2aadc3c936..13f31d60b8 100644
--- a/gnuradio-core/src/lib/runtime/gr_logger.h
+++ b/gnuradio-core/src/lib/runtime/gr_logger.h
@@ -70,35 +70,35 @@ typedef std::string gr_logger_ptr;
 #define GR_GET_LEVEL(name, level)
 #define GR_LOG_GET_LEVEL(logger, level)
 #define GR_ADD_CONSOLE_APPENDER(logger,target,pattern)
-#define GR_LOG_ADD_CONSOLE_APPENDER(logger,,target,pattern)
+#define GR_LOG_ADD_CONSOLE_APPENDER(logger,target,pattern)
 #define GR_ADD_FILE_APPENDER(name,filename,append,pattern)
 #define GR_LOG_ADD_FILE_APPENDER(logger,filename,append,pattern)
 #define GR_ADD_ROLLINGFILE_APPENDER(name,filename,filesize,bkup_index,append,mode,pattern)
 #define GR_LOG_ADD_ROLLINGFILE_APPENDER(logger,filename,filesize,bkup_index,append,mode,pattern)
 #define GR_GET_LOGGER_NAMES(names)
 #define GR_RESET_CONFIGURATION()
-#define GR_DEBUG(name, msg) std::cout<<"DEBUG:"<<msg<<std::endl
-#define GR_INFO(name, msg) std::cout<<"INFO:"<<msg<<std::endl
-#define GR_NOTICE(name, msg) std::cout<<"NOTICE:"<<msg<<std::endl
-#define GR_WARN(name, msg) std::cerr<<"WARN:"<<msg<<std::endl
-#define GR_ERROR(name, msg) std::cerr<<"ERROR:"<<msg<<std::endl
-#define GR_ALERT(name, msg) std::cerr<<"ERROR:"<<msg<<std::endl
-#define GR_CRIT(name, msg) std::cerr<<"ERROR:"<<msg<<std::endl
-#define GR_FATAL(name, msg) std::cerr<<"FATAL:"<<msg<<std::endl
-#define GR_EMERG(name, msg) std::cerr<<"EMERG:"<<msg<<std::endl
-#define GR_ERRORIF(name, cond, msg) if((cond)) std::cerr<<"ERROR:"<<msg<<std::endl
-#define GR_ASSERT(name, cond, msg) if(!(cond)) std::cerr<<"ERROR:"<<msg<<std::endl; assert(cond)
-#define GR_LOG_DEBUG(logger, msg) std::cout<<"DEBUG:"<<msg<<std::endl
-#define GR_LOG_INFO(logger, msg) std::cout<<"INFO:"<<msg<<std::endl
-#define GR_LOG_NOTICE(logger, msg) std::cout<<"NOTICE:"<<msg<<std::endl
-#define GR_LOG_WARN(logger, msg) std::cerr<<"WARN:"<<msg<<std::endl
-#define GR_LOG_ERROR(logger, msg) std::cerr<<"ERROR:"<<msg<<std::endl
-#define GR_LOG_ALERT(logger, msg) std::cerr<<"ALERT:"<<msg<<std::endl
-#define GR_LOG_CRIT(logger, msg) std::cerr<<"CRIT:"<<msg<<std::endl
-#define GR_LOG_FATAL(logger, msg) std::cerr<<"FATAL:"<<msg<<std::endl
-#define GR_LOG_EMERG(logger, msg) std::cerr<<"EMERG:"<<msg<<std::endl
-#define GR_LOG_ERRORIF(logger, cond, msg) if((cond)) std::cerr<<"ERROR:"<<msg<<std::endl
-#define GR_LOG_ASSERT(logger, cond, msg) std::cerr<<"ERROR:"<<msg<<std::endl; assert(cond)
+#define GR_DEBUG(name, msg) std::cout<<"DEBUG: "<<msg<<std::endl
+#define GR_INFO(name, msg) std::cout<<"INFO: "<<msg<<std::endl
+#define GR_NOTICE(name, msg) std::cout<<"NOTICE: "<<msg<<std::endl
+#define GR_WARN(name, msg) std::cerr<<"WARN: "<<msg<<std::endl
+#define GR_ERROR(name, msg) std::cerr<<"ERROR: "<<msg<<std::endl
+#define GR_ALERT(name, msg) std::cerr<<"ERROR: "<<msg<<std::endl
+#define GR_CRIT(name, msg) std::cerr<<"ERROR: "<<msg<<std::endl
+#define GR_FATAL(name, msg) std::cerr<<"FATAL: "<<msg<<std::endl
+#define GR_EMERG(name, msg) std::cerr<<"EMERG: "<<msg<<std::endl
+#define GR_ERRORIF(name, cond, msg) if((cond)) std::cerr<<"ERROR: "<<msg<<std::endl
+#define GR_ASSERT(name, cond, msg) if(!(cond)) std::cerr<<"ERROR: "<<msg<<std::endl; assert(cond)
+#define GR_LOG_DEBUG(logger, msg) std::cout<<"DEBUG: "<<msg<<std::endl
+#define GR_LOG_INFO(logger, msg) std::cout<<"INFO: "<<msg<<std::endl
+#define GR_LOG_NOTICE(logger, msg) std::cout<<"NOTICE: "<<msg<<std::endl
+#define GR_LOG_WARN(logger, msg) std::cerr<<"WARN: "<<msg<<std::endl
+#define GR_LOG_ERROR(logger, msg) std::cerr<<"ERROR: "<<msg<<std::endl
+#define GR_LOG_ALERT(logger, msg) std::cerr<<"ALERT: "<<msg<<std::endl
+#define GR_LOG_CRIT(logger, msg) std::cerr<<"CRIT: "<<msg<<std::endl
+#define GR_LOG_FATAL(logger, msg) std::cerr<<"FATAL: "<<msg<<std::endl
+#define GR_LOG_EMERG(logger, msg) std::cerr<<"EMERG: "<<msg<<std::endl
+#define GR_LOG_ERRORIF(logger, cond, msg) if((cond)) std::cerr<<"ERROR: "<<msg<<std::endl
+#define GR_LOG_ASSERT(logger, cond, msg) std::cerr<<"ERROR: "<<msg<<std::endl; assert(cond)
 
 #else /* HAVE_LOG4CPP */
 // Second configuration...logging to log4cpp
diff --git a/gnuradio-core/src/lib/runtime/qa_gr_logger.cc b/gnuradio-core/src/lib/runtime/qa_gr_logger.cc
index e409c6aea7..a8e4a1d766 100644
--- a/gnuradio-core/src/lib/runtime/qa_gr_logger.cc
+++ b/gnuradio-core/src/lib/runtime/qa_gr_logger.cc
@@ -41,13 +41,12 @@ qa_gr_logger::t1()
 
   GR_LOG_GETLOGGER(LOG,"main");
   GR_ADD_CONSOLE_APPENDER("main","cout","%d{%H:%M:%S} : %m%n");
-  GR_LOG_NOTICE(LOG,"test from c++ 1");
-  GR_LOG_DEBUG(LOG,"test from c++ 1");
-  GR_LOG_INFO(LOG,"test from c++ 1");
-  GR_LOG_WARN(LOG,"test from c++ 1");
-  GR_LOG_ERROR(LOG,"test from c++ 1");
-  GR_LOG_FATAL(LOG,"test from c++ 1");
-  GR_LOG_ERRORIF(LOG,2>1,"test from c++ 1");
+  GR_LOG_NOTICE(LOG,"test from c++ NOTICE");
+  GR_LOG_DEBUG(LOG,"test from c++ DEBUG");
+  GR_LOG_INFO(LOG,"test from c++ INFO");
+  GR_LOG_WARN(LOG,"test from c++ WARN");
+  GR_LOG_ERROR(LOG,"test from c++ ERROR");
+  GR_LOG_FATAL(LOG,"test from c++ FATAL");
   CPPUNIT_ASSERT(true);
 #endif
 }
-- 
cgit v1.2.3


From a8e278314730535225c577a0e73a94dc7fbee082 Mon Sep 17 00:00:00 2001
From: Tom Rondeau <trondeau@vt.edu>
Date: Mon, 25 Mar 2013 12:14:18 -0400
Subject: docs: updated docs for logging levels with use of log4cpp.

---
 docs/doxygen/other/logger.dox | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'docs/doxygen/other/logger.dox')

diff --git a/docs/doxygen/other/logger.dox b/docs/doxygen/other/logger.dox
index 9a97172ed0..22458051db 100644
--- a/docs/doxygen/other/logger.dox
+++ b/docs/doxygen/other/logger.dox
@@ -24,8 +24,8 @@ different levels. These levels are:
 
 The order here determines the level of output. These levels are
 hierarchical in that specifying any level also includes any level
-above it. For example, when using the Debug level, all Debug and
-higher messages are logged and Trace is ignored.
+above it. For example, when using the WARN level, all WARN and
+higher messages are logged while DEBUG and INFO are ignored.
 
 \subsection configfile Logging Configuration
 
-- 
cgit v1.2.3


From 9bbbda510c265b211b5b571db79ba259c67ee049 Mon Sep 17 00:00:00 2001
From: Mark Plett <mark.plett@jhuapl.edu>
Date: Tue, 19 Mar 2013 19:10:51 -0700
Subject: core: Made logger swig functional

Improved logger swig so gr_logger is a logger object that is configurable

Made logger config a singleton and made accessors for loggers from python
---
 docs/doxygen/other/logger.dox              |  31 ++-
 gnuradio-core/CMakeLists.txt               |   2 +-
 gnuradio-core/gr_log_default.conf          |  40 +++
 gnuradio-core/gr_log_default.xml           |  64 -----
 gnuradio-core/src/lib/runtime/gr_logger.cc | 173 +++++++++---
 gnuradio-core/src/lib/runtime/gr_logger.h  | 411 +++++++++++++++++------------
 gnuradio-core/src/lib/runtime/gr_logger.i  |  84 ++----
 7 files changed, 469 insertions(+), 336 deletions(-)
 create mode 100644 gnuradio-core/gr_log_default.conf
 delete mode 100644 gnuradio-core/gr_log_default.xml

(limited to 'docs/doxygen/other/logger.dox')

diff --git a/docs/doxygen/other/logger.dox b/docs/doxygen/other/logger.dox
index 22458051db..f5228cfc55 100644
--- a/docs/doxygen/other/logger.dox
+++ b/docs/doxygen/other/logger.dox
@@ -24,8 +24,9 @@ different levels. These levels are:
 
 The order here determines the level of output. These levels are
 hierarchical in that specifying any level also includes any level
-above it. For example, when using the WARN level, all WARN and
-higher messages are logged while DEBUG and INFO are ignored.
+above it. For example, when using the INFO level, all INFO and
+higher messages are logged and DEBUG is ignored.  A level NOTSET is provided
+to disable a logger.
 
 \subsection configfile Logging Configuration
 
@@ -143,7 +144,7 @@ provided with GNU Radio can be used. After installation, the default
 configuration script is located at:
 
 <pre>
-    $prefix/etc/gnuradio/gr_log_default.xml
+    $prefix/etc/gnuradio/gr_log_default.conf
 </pre>
 
 For the following examples, we will assume that our local
@@ -151,12 +152,12 @@ For the following examples, we will assume that our local
 
 \code
 [LOG]
-log_config = /opt/gr/etc/gnuadio/gr_log_default.xml
+log_config = /opt/gr/etc/gnuadio/gr_log_default.conf
 log_level = debug
 debug_level = Off
 \endcode
 
-Inside of the XML default configuration file, we define the parameters
+Inside of the default configuration file, we define the parameters
 for the two logger's, the standard logger the separate debug logger.
 
 If the levels of the two loggers are specified in our configuration
@@ -202,4 +203,24 @@ This creates a pointer called LOG (which is instantiated as a
 log4cpp:LoggerPtr in the macro) that we can now use locally as the
 input to our logging macros like 'GR_LOG_INFO(LOG, "message")'.
 
+\section logPy Logging from Python
+
+The logging capability has been brought out python via swig. The configuration 
+of the logger can be manipulated via the following calls:
+\code
+ from gnuradio import gr
+ gr.logger_config(filename,watch_period)  # Configures the logger with conf file filename
+ names = gr.logger_get_logger_names()  # Returns the names of all loggers
+ gr.logger_reset_config()   # Resets logger config by removing all appenders
+\endcode
+
+Once the logger is configured you can manipulate a logger via a wrapper class gr.logger(). 
+You can isntantiate this by the following.  (Reference gr_logger.h for list of methods)
+\code
+ from gnuradio import gr
+ log=gr.logger("nameOfLogger")
+ log.debug("Log a debug message")
+ log.set_level("INFO");
+
+\endcode
 */
diff --git a/gnuradio-core/CMakeLists.txt b/gnuradio-core/CMakeLists.txt
index 3dcffa2184..6a88b63cc7 100644
--- a/gnuradio-core/CMakeLists.txt
+++ b/gnuradio-core/CMakeLists.txt
@@ -148,7 +148,7 @@ install(
 
 if(ENABLE_GR_LOG AND HAVE_LOG4CPP)
 install(FILES
-    ${CMAKE_CURRENT_SOURCE_DIR}/gr_log_default.xml
+    ${CMAKE_CURRENT_SOURCE_DIR}/gr_log_default.conf
     DESTINATION ${GR_CONF_DIR}/gnuradio
     COMPONENT "core_runtime"
 )
diff --git a/gnuradio-core/gr_log_default.conf b/gnuradio-core/gr_log_default.conf
new file mode 100644
index 0000000000..79c2d91e94
--- /dev/null
+++ b/gnuradio-core/gr_log_default.conf
@@ -0,0 +1,40 @@
+/* 
+ * Copyright 2006,2010,2011 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+log4j.rootCategory=EMERG,A1
+log4j.category.gr_log=DEBUG,A2
+log4j.category.gr_log_debug=NOTSET,A3
+              
+log4j.appender.A1=org.apache.log4j.ConsoleAppender
+log4j.appender.A1.target=System.out
+log4j.appender.A1.layout=org.apache.log4j.PatternLayout
+log4j.appender.A1.layout.ConversionPattern=Root :%p: %c{1} - %m%n
+
+log4j.appender.A2=org.apache.log4j.ConsoleAppender
+log4j.appender.A2.target=System.out
+log4j.appender.A2.layout=org.apache.log4j.PatternLayout
+log4j.appender.A2.layout.ConversionPattern=gr::log :%p: %c{1} - %m%n
+
+log4j.appender.A3=org.apache.log4j.ConsoleAppender
+log4j.appender.A3.target=System.out
+log4j.appender.A3.layout=org.apache.log4j.PatternLayout
+log4j.appender.A3.layout.ConversionPattern=gr::debug :%p: %c{1} - %m%n
+
diff --git a/gnuradio-core/gr_log_default.xml b/gnuradio-core/gr_log_default.xml
deleted file mode 100644
index 13b854c7e8..0000000000
--- a/gnuradio-core/gr_log_default.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!-- 
- * Copyright 2006,2010,2011 Free Software Foundation, Inc.
- * 
- * This file is part of GNU Radio
- * 
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- * 
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
--->
-
- <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
-  
-  <appender name="RootConsoleAppender" class="org.apache.log4j.ConsoleAppender">    
-    <param name="Target" value="System.out"/>
-        <layout class="org.apache.log4j.PatternLayout">
-            <param name="ConversionPattern" value="Root :%p: %c{1} - %m%n"/>
-        </layout>
-  </appender>
-
-  <!--Add appender to root to log ALL msgs in one place-->
-  <root>
-        <priority value="all" />
-  </root>
-
-  <appender name="errLogRootConsoleAppender" class="org.apache.log4j.ConsoleAppender">    
-    <param name="Target" value="System.out"/>
-        <layout class="org.apache.log4j.PatternLayout">
-            <param name="ConversionPattern" value="gr::log :%p: %c{1} - %m%n"/>
-        </layout>
-  </appender>
-
-  <!-- Specify the level for some specific loggers-->
-  <category name="gr_log" >
-        <priority value ="all" />
-        <appender-ref ref="errLogRootConsoleAppender"/>
-  </category>
-
-  <appender name="errConsoleAppender" class="org.apache.log4j.ConsoleAppender">    
-    <param name="Target" value="System.out"/>
-        <layout class="org.apache.log4j.PatternLayout">
-            <param name="ConversionPattern" value="gr::debug :%p: %c{1} - %m%n"/>
-        </layout>
-  </appender>
-
-   <category name="gr_log_debug" >
-        <priority value ="DEBUG" />
-        <appender-ref ref="errConsoleAppender"/>
-  </category>
-
- </log4j:configuration>
-
diff --git a/gnuradio-core/src/lib/runtime/gr_logger.cc b/gnuradio-core/src/lib/runtime/gr_logger.cc
index 530c66f964..7e0116d036 100644
--- a/gnuradio-core/src/lib/runtime/gr_logger.cc
+++ b/gnuradio-core/src/lib/runtime/gr_logger.cc
@@ -26,10 +26,6 @@
 *   The gr_log module wraps the log4cpp library for logging in gnuradio.
 *******************************************************************************/
 
-//#ifdef HAVE_CONFIG_H
-//#include "config.h" 
-//#endif
-
 #include <gr_logger.h>
 #include <stdexcept>
 #include <algorithm>
@@ -37,33 +33,118 @@
 #ifdef ENABLE_GR_LOG
 #ifdef HAVE_LOG4CPP 
 
-bool gr_logger_configured(false);
+/**************************** BEGIN LOG4CPP HELPERS ***************************/
+/* Logger config class.  This is a singleton that controls how log4cpp is configured
+ * If watch_period>0 a thread is started to watch teh config file for changes.
+ */
 
-void
-logger_load_config(const std::string &config_filename)
-{
-  if(!gr_logger_configured){
-    gr_logger_configured = true;
-    if(config_filename.size() != 0) {
-       try
-       {
-         log4cpp::PropertyConfigurator::configure(config_filename);
-       }
-       catch( log4cpp::ConfigureFailure &e )
-       {
-         std::cout << "Logger config failed :" << e.what() << std::endl;
-       }
-    };
+// Getters of logger_config 
+logger_config& 
+logger_config::get_instance(void){
+  static logger_config instance;
+  return instance;
+};
+
+std::string 
+logger_config::get_filename(){
+  logger_config& in=get_instance(); 
+  return in.filename;
+};
+
+unsigned int 
+logger_config::get_watch_period(){
+  logger_config& in=get_instance(); 
+  return in.watch_period;
+};
+
+// Method to watch config file for changes
+void logger_config::watch_file(std::string filename,unsigned int watch_period){
+   std::time_t last_write(boost::filesystem::last_write_time(filename));
+   std::time_t current_time(0);
+   while(true){
+    try{
+     current_time = boost::filesystem::last_write_time(filename);
+     if(current_time>last_write){
+       std::cout<<"GNURadio Reloading logger configuration:"<<filename<<std::endl;
+       last_write = current_time;
+// Should we wipe out all old configuration or just add the new?  Just adding...
+//     logger_reset_config();  
+       logger_load_config(filename);     
+     };
+       boost::this_thread::sleep(boost::posix_time::time_duration(0,0,watch_period,0));
+    }
+    catch(const boost::thread_interrupted&){
+       std::cout<<"GNURadio leaving logger config file watch."<<std::endl;
+      break;
+    }; 
+   };
+};
+
+// Method to load the confifuration.  It only loads if the filename or watch has changed
+void logger_config::load_config(std::string filename,unsigned int watch_period){
+  logger_config& instance = get_instance();
+// Only reconfigure if filename or watch has changed
+  if(instance.filename!=filename || watch_period!=instance.watch_period){
+    instance.filename = filename;
+    instance.watch_period = watch_period;
+// Stop any file watching thread
+    if(instance.watch_thread!=NULL) stop_watch();
+// Load configuration   
+    std::cout<<"GNURadio Loading logger configuration:"<<instance.filename<<std::endl;
+    logger_load_config(instance.filename);
+// Start watch if required
+    if(instance.watch_period>0){
+      instance.watch_thread = new boost::thread(watch_file,instance.filename,instance.watch_period);
+    }
   };
+};
+
+// Method to stop the watcher thread
+void logger_config::stop_watch(){
+  logger_config& instance = get_instance();
+     if(instance.watch_thread){
+       instance.watch_thread->interrupt(); 
+       instance.watch_thread->join(); 
+       delete(instance.watch_thread);
+       instance.watch_thread=NULL;
+     };
+};
+
+// Method to reset logger configuration
+void 
+logger_config::reset_config(void){
+  logger_config& instance = get_instance();
+  stop_watch();
+  std::vector<log4cpp::Category*> *loggers = log4cpp::Category::getCurrentCategories();
+  std::vector<log4cpp::Category*>::iterator logger = loggers->begin();
+// We can't destroy categories but we can neuter them by removing all appenders.
+  for (;logger!=loggers->end();logger++){
+    (*logger)->removeAllAppenders();
+  };
+  instance.filename=std::string("");
+  instance.watch_period=0;
 }
 
+/***************** Functions to call log4cpp methods *************************/
+
+gr_logger_ptr 
+logger_get_logger(std::string name)
+{
+      if(log4cpp::Category::exists(name)){
+        gr_logger_ptr logger = &log4cpp::Category::getInstance(name);
+        return logger;
+      }
+      else
+      {
+        gr_logger_ptr logger = &log4cpp::Category::getInstance(name);
+        logger->setPriority(log4cpp::Priority::NOTSET);
+        return logger;
+      };
+};
+
 void
-logger_load_config_and_watch(const std::string &config_filename,
-                             unsigned int watch_period)
+logger_load_config(const std::string &config_filename)
 {
-// NOTE:: NEEDS CODE TO WATCH FILE HERE
-  if(!gr_logger_configured){
-    gr_logger_configured = true;
     if(config_filename.size() != 0) {
        try
        {
@@ -74,17 +155,6 @@ logger_load_config_and_watch(const std::string &config_filename,
          std::cout << "Logger config failed :" << e.what() << std::endl;
        }
     };
-  };
-}
-
-void 
-logger_reset_config(void){
-  std::vector<log4cpp::Category*> *loggers = log4cpp::Category::getCurrentCategories();
-  std::vector<log4cpp::Category*>::iterator logger = loggers->begin();
-// We can't destroy categories but we can neuter them by removing all appenders.
-  for (;logger!=loggers->end();logger++){
-    (*logger)->removeAllAppenders();
-  };
 }
 
 void
@@ -95,7 +165,7 @@ logger_set_level(gr_logger_ptr logger, const std::string &level)
 
   if(nocase == "off" || nocase == "notset")
     logger_set_level(logger, log4cpp::Priority::NOTSET);
-  else if(nocase == "debug")
+  else if(nocase == "all" || nocase == "debug")
     logger_set_level(logger, log4cpp::Priority::DEBUG);
   else if(nocase == "info")
     logger_set_level(logger, log4cpp::Priority::INFO);
@@ -111,7 +181,7 @@ logger_set_level(gr_logger_ptr logger, const std::string &level)
     logger_set_level(logger, log4cpp::Priority::ALERT);
  else if(nocase=="fatal")
     logger_set_level(logger, log4cpp::Priority::FATAL);
-  else if(nocase == "all" || nocase == "emerg")
+  else if(nocase == "emerg")
     logger_set_level(logger, log4cpp::Priority::EMERG);
   else
     throw std::runtime_error("logger_set_level: Bad level type.\n");
@@ -151,7 +221,7 @@ logger_add_console_appender(gr_logger_ptr logger,std::string target,std::string
 
   log4cpp::PatternLayout* layout = new log4cpp::PatternLayout();
   log4cpp::Appender* app;
-  if(target=="cout")
+  if(target=="stdout")
     app = new log4cpp::OstreamAppender("ConsoleAppender::",&std::cout);
   else
 	  app = new log4cpp::OstreamAppender("ConsoleAppender::",&std::cerr);
@@ -188,17 +258,34 @@ logger_add_rollingfile_appender(gr_logger_ptr logger,std::string filename,
   logger->setAppender(app);
 }
 
-void
-logger_get_logger_names(std::vector<std::string>& names){
+std::vector<std::string>
+logger_get_logger_names(void){
+  std::vector<std::string> names;
   std::vector<log4cpp::Category*> *loggers = log4cpp::Category::getCurrentCategories();
   std::vector<log4cpp::Category*>::iterator logger = loggers->begin();
 
-  names.clear();
   for (;logger!=loggers->end();logger++){
     names.push_back((*logger)->getName());
   };
-  
+  return names;  
+
 }
 
 #endif /* HAVE_LOG4CPP */
+
+/****** Start Methods to provide Python the capabilities of the macros ********/
+void gr_logger_config(const std::string config_filename, unsigned int watch_period){
+  GR_CONFIG_AND_WATCH_LOGGER(config_filename,watch_period);  
+};
+std::vector<std::string> gr_logger_get_logger_names(void){
+  std::vector<std::string> names;
+  GR_GET_LOGGER_NAMES(names);
+  return names;
+};
+void gr_logger_reset_config(void){
+  GR_RESET_CONFIGURATION();
+};
+
+// Remaining capability provided by gr_logger class in gr_logger.h
+
 #endif /* ENABLE_GR_LOGGER */
diff --git a/gnuradio-core/src/lib/runtime/gr_logger.h b/gnuradio-core/src/lib/runtime/gr_logger.h
index 2ccd498822..db6df722ec 100644
--- a/gnuradio-core/src/lib/runtime/gr_logger.h
+++ b/gnuradio-core/src/lib/runtime/gr_logger.h
@@ -38,19 +38,14 @@
 
 #ifndef ENABLE_GR_LOG
 #include "config.h"
-//#define GR_LOG_CONFIG_H
 #endif
 
 #include <gr_core_api.h>
 #include <assert.h>
 #include <iostream>
-
-//#ifndef ENABLE_GR_LOG
-//#define ENABLE_GR_LOG 1
-//#endif
-//#ifndef HAVE_LOG4CPP
-//#define HAVE_LOG4CPP 2
-//#endif
+#include <time.h>
+#include <boost/filesystem.hpp>
+#include <boost/thread.hpp>
 
 #ifdef ENABLE_GR_LOG
 
@@ -86,8 +81,8 @@ typedef std::string gr_logger_ptr;
 #define GR_CRIT(name, msg) std::cerr<<"ERROR: "<<msg<<std::endl
 #define GR_FATAL(name, msg) std::cerr<<"FATAL: "<<msg<<std::endl
 #define GR_EMERG(name, msg) std::cerr<<"EMERG: "<<msg<<std::endl
-#define GR_ERRORIF(name, cond, msg) if((cond)) std::cerr<<"ERROR: "<<msg<<std::endl
-#define GR_ASSERT(name, cond, msg) if(!(cond)) std::cerr<<"ERROR: "<<msg<<std::endl; assert(cond)
+#define GR_ERRORIF(name, cond, msg) {if((cond)) std::cerr<<"ERROR: "<<msg<<std::endl;}
+#define GR_ASSERT(name, cond, msg) {if(!(cond)) std::cerr<<"FATAL: "<<msg<<std::endl; assert(cond);}
 #define GR_LOG_DEBUG(logger, msg) std::cout<<"DEBUG: "<<msg<<std::endl
 #define GR_LOG_INFO(logger, msg) std::cout<<"INFO: "<<msg<<std::endl
 #define GR_LOG_NOTICE(logger, msg) std::cout<<"NOTICE: "<<msg<<std::endl
@@ -97,8 +92,10 @@ typedef std::string gr_logger_ptr;
 #define GR_LOG_CRIT(logger, msg) std::cerr<<"CRIT: "<<msg<<std::endl
 #define GR_LOG_FATAL(logger, msg) std::cerr<<"FATAL: "<<msg<<std::endl
 #define GR_LOG_EMERG(logger, msg) std::cerr<<"EMERG: "<<msg<<std::endl
-#define GR_LOG_ERRORIF(logger, cond, msg) if((cond)) std::cerr<<"ERROR: "<<msg<<std::endl
-#define GR_LOG_ASSERT(logger, cond, msg) std::cerr<<"ERROR: "<<msg<<std::endl; assert(cond)
+#define GR_LOG_ERRORIF(logger, cond, msg) {\
+  if((cond)) std::cerr<<"ERROR: "<<msg<<std::endl;}
+#define GR_LOG_ASSERT(logger, cond, msg) {\
+  if(!(cond)) {std::cerr<<"FATAL: "<<msg<<std::endl; assert(cond);};}
 
 #else /* HAVE_LOG4CPP */
 // Second configuration...logging to log4cpp
@@ -133,104 +130,104 @@ typedef log4cpp::Category* gr_logger_ptr;
   gr_logger_ptr logger;
 
 #define GR_LOG_ASSIGN_LOGPTR(logger,name) \
-  logger = gr_logger::getLogger(name);
+  logger = logger_get_logger(name);
 
 #define GR_CONFIG_LOGGER(config)	\
-  logger_load_config(config)
+  logger_config::load_config(config)
 
 #define GR_CONFIG_AND_WATCH_LOGGER(config,period)	\
-  logger_load_config_and_watch(config,period)
+  logger_config::load_config(config,period)
 
 #define GR_LOG_GETLOGGER(logger, name) \
-  gr_logger_ptr logger = gr_logger::getLogger(name);
+  gr_logger_ptr logger = logger_get_logger(name);
 
 #define GR_SET_LEVEL(name, level){ \
-  gr_logger_ptr logger = gr_logger::getLogger(name);\
+  gr_logger_ptr logger = logger_get_logger(name);\
   logger_set_level(logger,level);}
 
 #define GR_LOG_SET_LEVEL(logger, level) \
   logger_set_level(logger, level);
 
 #define GR_GET_LEVEL(name, level){ \
-  gr_logger_ptr logger = gr_logger::getLogger(name);\
+  gr_logger_ptr logger = logger_get_logger(name);\
   logger_get_level(logger,level);}
 
 #define GR_LOG_GET_LEVEL(logger, level) \
   logger_get_level(logger,level);
 
 #define GR_ADD_CONSOLE_APPENDER(name,target,pattern){\
-  gr_logger_ptr logger = gr_logger::getLogger(name);\
+  gr_logger_ptr logger = logger_get_logger(name);\
   logger_add_console_appender(logger,target,pattern);}
 
 #define GR_LOG_ADD_CONSOLE_APPENDER(logger,target,pattern){\
   logger_add_console_appender(logger,target,pattern);}
 
 #define GR_ADD_FILE_APPENDER(name,filename,append,pattern){\
-  gr_logger_ptr logger = gr_logger::getLogger(name);\
+  gr_logger_ptr logger = logger_get_logger(name);\
   logger_add_file_appender(logger,filename,append,pattern);}
 
 #define GR_LOG_ADD_FILE_APPENDER(logger,filename,append,pattern){\
   logger_add_file_appender(logger,filename,append,pattern);}
 
 #define GR_ADD_ROLLINGFILE_APPENDER(name,filename,filesize,bkup_index,append,mode,pattern){\
-  gr_logger_ptr logger = gr_logger::getLogger(name);\
+  gr_logger_ptr logger = logger_get_logger(name);\
   logger_add_rollingfile_appender(logger,filename,filesize,bkup_index,append,mode,pattern);}
 
 #define GR_LOG_ADD_ROLLINGFILE_APPENDER(logger,filename,filesize,bkup_index,append,mode,pattern){\
   logger_add_rollingfile_appender(logger,filename,filesize,bkup_index,append,mode,pattern);}
 
 #define GR_GET_LOGGER_NAMES(names){ \
-  logger_get_logger_names(names);}
+  names = logger_get_logger_names();}
 
 #define GR_RESET_CONFIGURATION(){ \
-  logger_reset_config();}
+  logger_config::reset_config();}
 
 /* Logger name referenced macros */
 #define GR_DEBUG(name, msg) { \
-  gr_logger_ptr logger = gr_logger::getLogger(name);\
+  gr_logger_ptr logger = logger_get_logger(name);\
   *logger<< log4cpp::Priority::DEBUG << msg << log4cpp::eol;}
 
 #define GR_INFO(name, msg) { \
-  gr_logger_ptr logger = gr_logger::getLogger(name);\
+  gr_logger_ptr logger = logger_get_logger(name);\
   *logger<< log4cpp::Priority::INFO << msg << log4cpp::eol;}
 
 #define GR_NOTICE(name, msg) { \
-  gr_logger_ptr logger = gr_logger::getLogger(name);\
+  gr_logger_ptr logger = logger_get_logger(name);\
   *logger << log4cpp::Priority::NOTICE << msg;}
 
 #define GR_WARN(name, msg) { \
-  gr_logger_ptr logger = gr_logger::getLogger(name);\
+  gr_logger_ptr logger = logger_get_logger(name);\
   *logger<< log4cpp::Priority::WARN << msg << log4cpp::eol;}
 
 #define GR_ERROR(name, msg) { \
-  gr_logger_ptr logger = gr_logger::getLogger(name);\
+  gr_logger_ptr logger = logger_get_logger(name);\
   *logger<< log4cpp::Priority::ERROR << msg << log4cpp::eol;}
 
 #define GR_CRIT(name, msg) { \
-  gr_logger_ptr logger = gr_logger::getLogger(name);\
+  gr_logger_ptr logger = logger_get_logger(name);\
   *logger<< log4cpp::Priority::CRIT << msg << log4cpp::eol;}
 
 #define GR_ALERT(name, msg) { \
-  gr_logger_ptr logger = gr_logger::getLogger(name);\
+  gr_logger_ptr logger = logger_get_logger(name);\
   *logger<< log4cpp::Priority::ALERT << msg << log4cpp::eol;}
 
 #define GR_FATAL(name, msg) { \
-  gr_logger_ptr logger = gr_logger::getLogger(name);\
+  gr_logger_ptr logger = logger_get_logger(name);\
   *logger<< log4cpp::Priority::FATAL << msg << log4cpp::eol;}
 
 #define GR_EMERG(name, msg) { \
-  gr_logger_ptr logger = gr_logger::getLogger(name);\
+  gr_logger_ptr logger = logger_get_logger(name);\
   *logger<< log4cpp::Priority::EMERG << msg << log4cpp::eol;}
 
 #define GR_ERRORIF(name, cond, msg) { \
 if((cond)){\
-  gr_logger_ptr logger = gr_logger::getLogger(name);\
+  gr_logger_ptr logger = logger_get_logger(name);\
   *logger<< log4cpp::Priority::ERROR << msg << log4cpp::eol;};\
 };
 
 #define GR_ASSERT(name, cond, msg) { \
-if((!cond)){\
-    gr_logger_ptr logger = gr_logger::getLogger(name);\
+if(!(cond)){\
+    gr_logger_ptr logger = logger_get_logger(name);\
     *logger<< log4cpp::Priority::EMERG << msg << log4cpp::eol;};\
     assert(0);\
 };
@@ -264,17 +261,74 @@ if((!cond)){\
   *logger << log4cpp::Priority::EMERG << msg << log4cpp::eol;}
 
 #define GR_LOG_ERRORIF(logger,cond, msg) { \
-if((!cond)){\
+if((cond)){\
     *logger<< log4cpp::Priority::ERROR << msg << log4cpp::eol;};\
-    assert(0);\
 };
 
 #define GR_LOG_ASSERT(logger, cond, msg) { \
-if((!cond)){\
-    *logger<< log4cpp::Priority::EMERG << msg << log4cpp::eol;};\
-    assert(0);\
+if(!(cond)){\
+    *logger<< log4cpp::Priority::EMERG << msg << log4cpp::eol;\
+    assert(0);};\
 };
 
+/*!
+ * \brief Class to control configuration of logger.  
+ * This is a singleton that cna launch a thread to wathc a config file for changes
+ * \ingroup logging
+ */
+class logger_config {
+private:
+  /*! \brief filename of logger config file */
+  std::string filename;
+  /*! \brief Period (seconds) over which watcher thread checks config file for changes */
+  unsigned int watch_period;
+  /*! \brief Pointer to watch thread for config file changes */
+  boost::thread *watch_thread;
+
+  /*! \brief Watcher thread method 
+   * /param filename Name of configuration file
+   * /param watch_period Seconds between checks for changes in config file
+   */
+  static void watch_file(std::string filename,unsigned int watch_period);
+
+  logger_config(){};  //!< Constructor
+  logger_config(logger_config const&);  //!<Copy constructor
+  void operator=(logger_config const&);  //!<Assignment Operator
+
+  /*! \brief destrcutor stops watch thread before exits */
+  ~logger_config(){ 
+     stop_watch();
+  };
+
+  /*! \brief Instance getter for singleton.  Only used by class. */
+  static logger_config& get_instance(void);
+
+public:
+  /*! \brief Getter for config filename */
+  static std::string get_filename();
+  /*! \brief Getter for watch period */
+  static unsigned int get_watch_period();
+  /*! \brief Method to load configuration
+   * /param filename Name of configuration file
+   * /param watch_period Seconds between checks for changes in config file
+   */
+  static void load_config(std::string filename,unsigned int watch_period=0);
+  /*! \brief Method to stop watcher thread */
+  static void stop_watch();
+  /*! \brief method to reset logger configuration */
+  static void reset_config(void);
+};
+
+/*!
+ * \brief Retrieve a pointer to a logger by name
+ *
+ * Retrives a logger pointer
+ * \p name.
+ *
+ * \param name Name of the logger for which a pointer is requested
+ */
+GR_CORE_API gr_logger_ptr logger_get_logger(std::string name);
+
 /*!
  * \brief Load logger's configuration file.
  *
@@ -286,10 +340,11 @@ if((!cond)){\
  */
 GR_CORE_API void logger_load_config(const std::string &config_filename="");
 
-
-GR_CORE_API void logger_load_config_and_watch(const std::string &config_filename,
-                                              unsigned int watch_period);
-
+/*!
+ * \brief Reset logger's configuration file.
+ *
+ * Remove all appenders from loggers
+ */
 GR_CORE_API void logger_reset_config(void);
 
 /*!
@@ -334,7 +389,7 @@ GR_CORE_API void logger_set_level(gr_logger_ptr logger, const std::string &level
  * \param logger the logger to set the level of.
  * \param level  new logger level of type Log4cpp::Priority
  */
-void logger_set_level(gr_logger_ptr logger, log4cpp::Priority::Value level);
+GR_CORE_API void logger_set_level(gr_logger_ptr logger, log4cpp::Priority::Value level);
 
 
 /*!
@@ -381,140 +436,57 @@ GR_CORE_API void logger_get_level(gr_logger_ptr logger, std::string &level);
  */
 GR_CORE_API void logger_get_level(gr_logger_ptr logger, log4cpp::Priority::Value &level);
 
+/*!
+ * \brief Add console appender to a given logger
+ *
+ * Add console appender to a given logger
+ *
+ * \param logger Logger to which appender will be added
+ * \param target Std target to write 'cout' or 'cerr' (default is cout)
+ * \param pattern Formating pattern for log messages
+ */
 GR_CORE_API void logger_add_console_appender(gr_logger_ptr logger,std::string target,std::string pattern);
 
+/*!
+ * \brief Add file appender to a given logger
+ *
+ * Add file appender to a given logger
+ *
+ * \param logger Logger to which appender will be added
+ * \param filename File to which log will be written
+ * \param append Overwrite or append to log file
+ * \param pattern Formating pattern for log messages
+ */
 GR_CORE_API void logger_add_file_appender(gr_logger_ptr logger,std::string filename,bool append,std::string pattern);
 
+/*!
+ * \brief Add rolling file appender to a given logger
+ *
+ * Add rolling file appender to a given logger
+ *
+ * \param logger Logger to which appender will be added
+ * \param filename File to which log will be written
+ * \param filesize Sizez of files to write
+ * \param bkup_index Number of files to write
+ * \param append Overwrite or append to log file
+ * \param mode Permissions to set on log file
+ * \param pattern Formating pattern for log messages
+ */
 GR_CORE_API void logger_add_rollingfile_appender(gr_logger_ptr logger,std::string filename,
                     size_t filesize,int bkup_index,bool append,mode_t mode,std::string pattern);
 
-GR_CORE_API void logger_get_logger_names(std::vector<std::string>& names);
-
 /*!
- * \brief instantiate (configure) logger.
- * \ingroup logging
+ * \brief Add rolling file appender to a given logger
+ *
+ * Add rolling file appender to a given logger
  *
+ * \return vector of string names of loggers 
  */
-class gr_logger
-{
- public:
-  /*!
-   * \brief contructor take log configuration file and configures loggers.
-   */
-  gr_logger(std::string config_filename)
-  {
-    // Load configuration file
-    logger_load_config(config_filename);
-  };
-
-  /*!
-   * \brief contructor take log configuration file and watchtime and configures
-   */
-  gr_logger(std::string config_filename, int watchPeriodSec)
-  {
-    // Load configuration file
-    logger_load_config_and_watch(config_filename,watchPeriodSec);
-
-  };
-
-  static gr_logger_ptr getLogger(std::string name)
-  {
-      if(log4cpp::Category::exists(name)){
-        gr_logger_ptr logger = &log4cpp::Category::getInstance(name);
-        return logger;
-      }
-      else
-      {
-        gr_logger_ptr logger = &log4cpp::Category::getInstance(name);
-        logger->setPriority(log4cpp::Priority::NOTSET);
-        return logger;
-      };
-  };
-
-  // Wrappers for logging macros
-  /*! \brief inline function, wrapper to set the logger level */
-  void set_level(std::string name,std::string level){GR_SET_LEVEL(name,level);}
-  
-  /*! \brief inline function, wrapper to get the logger level */
-  void get_level(std::string name,std::string &level){GR_GET_LEVEL(name,level);}
-
-  /*! \brief inline function, wrapper for DEBUG message */
-  void debug(std::string name,std::string msg){GR_DEBUG(name,msg);};
-
-  /*! \brief inline function, wrapper for INFO message */
-  void info(std::string name,std::string msg){GR_INFO(name,msg);};
-
-  /*! \brief inline function, wrapper for NOTICE message */
-  void notice(std::string name,std::string msg){GR_NOTICE(name,msg);};
-
-  /*! \brief inline function, wrapper for WARN message */
-  void warn(std::string name,std::string msg){GR_WARN(name,msg);};
-
-  /*! \brief inline function, wrapper for ERROR message */
-  void error(std::string name,std::string msg){GR_ERROR(name,msg);};
-
-  /*! \brief inline function, wrapper for CRIT message */
-  void crit(std::string name,std::string msg){GR_CRIT(name,msg);};
-
-  /*! \brief inline function, wrapper for ALERT message */
-  void alert(std::string name,std::string msg){GR_ALERT(name,msg);};
-
-  /*! \brief inline function, wrapper for FATAL message */
-  void fatal(std::string name,std::string msg){GR_FATAL(name,msg);};
-
-  /*! \brief inline function, wrapper for EMERG message */
-  void emerg(std::string name,std::string msg){GR_EMERG(name,msg);};
-
-  /*! \brief inline function, wrapper for LOG4CPP_ASSERT for conditional ERROR message */
-  void errorIF(std::string name,bool cond,std::string msg){GR_ERRORIF(name,cond,msg);};
-
-  /*! \brief inline function, wrapper for LOG4CPP_ASSERT for conditional ERROR message */
-  void gr_assert(std::string name,bool cond,std::string msg){GR_ASSERT(name,cond,msg);};
-
-  // Wrappers for Logger Pointer referenced functions
-  /*! \brief inline function, wrapper to set the logger level */
-  void set_log_level(gr_logger_ptr logger,std::string level){GR_LOG_SET_LEVEL(logger,level);}
-
-  /*! \brief inline function, wrapper to get the logger level */
-  void get_log_level(gr_logger_ptr logger,std::string &level){GR_LOG_GET_LEVEL(logger,level);}
-
-  /*! \brief inline function, wrapper for LOG4CPP_DEBUG for DEBUG message */
-  void log_debug(gr_logger_ptr logger,std::string msg){GR_LOG_DEBUG(logger,msg);};
-
-  /*! \brief inline function, wrapper for LOG4CPP_INFO for INFO message */
-  void log_info(gr_logger_ptr logger,std::string msg){GR_LOG_INFO(logger,msg);};
-
-  /*! \brief inline function, wrapper for NOTICE message */
-  void log_notice(gr_logger_ptr logger,std::string msg){GR_LOG_NOTICE(logger,msg);};
-
-  /*! \brief inline function, wrapper for LOG4CPP_WARN for WARN message */
-  void log_warn(gr_logger_ptr logger,std::string msg){GR_LOG_WARN(logger,msg);};
-
-  /*! \brief inline function, wrapper for LOG4CPP_ERROR for ERROR message */
-  void log_error(gr_logger_ptr logger,std::string msg){GR_LOG_ERROR(logger,msg);};
-
-  /*! \brief inline function, wrapper for NOTICE message */
-  void log_crit(gr_logger_ptr logger,std::string msg){GR_LOG_CRIT(logger,msg);};
-
-  /*! \brief inline function, wrapper for ALERT message */
-  void log_alert(gr_logger_ptr logger,std::string msg){GR_LOG_ALERT(logger,msg);};
-
-  /*! \brief inline function, wrapper for FATAL message */
-  void log_fatal(gr_logger_ptr logger,std::string msg){GR_LOG_FATAL(logger,msg);};
-
-  /*! \brief inline function, wrapper for EMERG message */
-  void log_emerg(gr_logger_ptr logger,std::string msg){GR_LOG_EMERG(logger,msg);};
-
-  /*! \brief inline function, wrapper for LOG4CPP_ASSERT for conditional ERROR message */
-  void log_errorIF(gr_logger_ptr logger,bool cond,std::string msg){GR_LOG_ERRORIF(logger,cond,msg);};
-
-  /*! \brief inline function, wrapper for LOG4CPP_ASSERT for conditional ERROR message */
-  void log_assert(gr_logger_ptr logger,bool cond,std::string msg){GR_LOG_ASSERT(logger,cond,msg);};
-};
-
+GR_CORE_API std::vector<std::string> logger_get_logger_names(void);
 
 #endif /* HAVE_LOG4CPP */
 
+
 // If Logger disable do nothing
 #else /* ENABLE_GR_LOG */
 
@@ -561,4 +533,111 @@ typedef void* gr_logger_ptr;
 #define GR_LOG_ASSERT(logger, cond, msg)
 
 #endif /* ENABLE_GR_LOG */
+
+// Even if logger is disabled we'll need for methods below to exist in python.
+// The macros these call will be disabled if ENABLE_GR_LOG is undefined
+
+/********************* Start  Classes and Methods for Python ******************/
+/*!
+ * \brief Logger class for referencing loggers in python.  Not needed in C++ (use macros)
+ * Wraps and manipulates loggers for python as python has no macros
+ * \ingroup logging
+ *
+ */
+class gr_logger
+{
+ private:
+  /*! \brief logger pointer to logger associated wiith this wrapper class */
+  gr_logger_ptr d_logger;
+ public:
+  /*!
+   * \brief contructor Provide name of logger to associate with this class
+   * \param logger_name Name of logger associated with class
+   */
+  gr_logger(std::string logger_name) {
+    GR_LOG_ASSIGN_LOGPTR(d_logger,logger_name);
+  };
+
+  /*! \brief Destructor */
+  ~gr_logger(){;};
+
+  // Wrappers for logging macros
+  /*! \brief inline function, wrapper to set the logger level */
+  void set_level(std::string level){GR_LOG_SET_LEVEL(d_logger,level);}
+
+  /*! \brief inline function, wrapper to get the logger level */
+  void get_level(std::string &level){GR_LOG_GET_LEVEL(d_logger,level);}
+
+  /*! \brief inline function, wrapper for LOG4CPP_DEBUG for DEBUG message */
+  void debug(std::string msg){GR_LOG_DEBUG(d_logger,msg);};
+
+  /*! \brief inline function, wrapper for LOG4CPP_INFO for INFO message */
+  void info(std::string msg){GR_LOG_INFO(d_logger,msg);};
+
+  /*! \brief inline function, wrapper for NOTICE message */
+  void notice(std::string msg){GR_LOG_NOTICE(d_logger,msg);};
+
+  /*! \brief inline function, wrapper for LOG4CPP_WARN for WARN message */
+  void warn(std::string msg){GR_LOG_WARN(d_logger,msg);};
+
+  /*! \brief inline function, wrapper for LOG4CPP_ERROR for ERROR message */
+  void error(std::string msg){GR_LOG_ERROR(d_logger,msg);};
+
+  /*! \brief inline function, wrapper for NOTICE message */
+  void crit(std::string msg){GR_LOG_CRIT(d_logger,msg);};
+
+  /*! \brief inline function, wrapper for ALERT message */
+  void alert(std::string msg){GR_LOG_ALERT(d_logger,msg);};
+
+  /*! \brief inline function, wrapper for FATAL message */
+  void fatal(std::string msg){GR_LOG_FATAL(d_logger,msg);};
+
+  /*! \brief inline function, wrapper for EMERG message */
+  void emerg(std::string msg){GR_LOG_EMERG(d_logger,msg);};
+
+  /*! \brief inline function, wrapper for LOG4CPP_ASSERT for conditional ERROR message */
+  void errorIF(bool cond,std::string msg){GR_LOG_ERRORIF(d_logger,cond,msg);};
+
+  /*! \brief inline function, wrapper for LOG4CPP_ASSERT for conditional ERROR message */
+  void log_assert(bool cond,std::string msg){GR_LOG_ASSERT(d_logger,cond,msg);};
+
+  /*! \brief inline function, Method to add console appender to logger */
+  void add_console_appender(std::string target,std::string pattern){
+     GR_LOG_ADD_CONSOLE_APPENDER(d_logger,target,pattern);
+  };
+
+  /*! \brief inline function, Method to add file appender to logger */
+  void add_file_appender(std::string filename,bool append,std::string pattern){
+     GR_LOG_ADD_FILE_APPENDER(d_logger,filename,append,pattern);
+  };
+
+  /*! \brief inline function, Method to add rolling file appender to logger */
+  void add_rollingfile_appender(std::string filename,size_t filesize,
+                int bkup_index,bool append,mode_t mode,std::string pattern){
+     GR_LOG_ADD_ROLLINGFILE_APPENDER(d_logger,filename,filesize,
+                bkup_index,append,mode,pattern);
+  };
+};
+
+/**************** Start Configuration Class and Methods for Python ************/
+/*!
+ * \brief Function to call configuration macro from python.  
+ *        Note: Configuration is only updated if filename or watch_period has changed.
+ * \param config_filename  Name of configuration file
+ * \param watch_period Seconds to wait between checking for changes in conf file.
+ *        Watch_period defaults to 0 in which case the file is not watched for changes
+ */
+GR_CORE_API void gr_logger_config(const std::string config_filename, unsigned int watch_period = 0);
+/*!
+ * \brief Function to return logger names to python
+ * \return Vector of name strings
+ *
+ */
+GR_CORE_API std::vector<std::string> gr_logger_get_logger_names(void);
+/*!
+ * \brief Function to reset logger configuration from python
+ * 
+ */
+GR_CORE_API void gr_logger_reset_config(void);
+
 #endif /* INCLUDED_GR_LOGGER_H */
diff --git a/gnuradio-core/src/lib/runtime/gr_logger.i b/gnuradio-core/src/lib/runtime/gr_logger.i
index 70e50e02b3..b43bff5a89 100644
--- a/gnuradio-core/src/lib/runtime/gr_logger.i
+++ b/gnuradio-core/src/lib/runtime/gr_logger.i
@@ -39,71 +39,41 @@
 
 //-----------------------------------
 
-#ifdef ENABLE_GR_LOG
-#ifdef HAVE_LOG4CPP
-
 %{
 // The .h files
 #include <gr_logger.h>
-#include <log4cpp/Category.hh>
 %}
 
-namespace log4cpp{
-class LoggerPtr {
-public:
- ~LoggerPtr();
-};
-};
-void logger_load_config(const std::string &config_filename);
-void logger_set_level(log4cpp::LoggerPtr logger, const std::string &level);
+%rename(logger) gr_logger;
+%rename(logger_config) gr_logger_config;
+%rename(logger_get_names) gr_logger_get_logger_names;
+%rename(logger_reset_config) gr_logger_reset_config;
 
-%rename(log) gr_logger;
+
+void gr_logger_config(const std::string config_filename,unsigned int watch_period = 0);
+std::vector<std::string> gr_logger_get_logger_names(void);
+void gr_logger_reset_config(void);
 
 class gr_logger
 {
-private:
-  
-public:
-  //gr_logger(std::string config_filename);
-  gr_logger(std::string config_filename,int watchPeriodSec);
-  void set_level(std::string name,std::string level);
-  void get_level(std::string name,std::string &level);
-  void add_console_appender(std::string name,std::string target,std::string pattern);
-  void add_file_appender(std::string name,std::string filename,bool append,std::string patter);
-  void add_rollingfile_appender(std::string name,std::string filename,size_t filesize,int bkup_indx,bool append,mode_t mode,std::string pattern);
-
-  void notice(std::string name,std::string msg);
-  void debug(std::string name,std::string msg);
-  void info(std::string name,std::string msg);
-  void warn(std::string name,std::string msg);
-  void error(std::string name,std::string msg);
-  void emerg(std::string name,std::string msg);
-  void crit(std::string name,std::string msg);
-  void errorIF(std::string name,bool cond,std::string msg);
-  void gr_assert(std::string name,bool cond,std::string msg);
-
-  static gr_logger_ptr getLogger(std::string name);
-
-  void log_set_level(gr_logger_ptr logger,std::string level);
-  void log_get_level(gr_logger_ptr logger,std::string &level);
-  void log_add_console_appender(gr_logger_ptr logger,std::string target,std::string pattern);
-  void log_add_file_appender(gr_logger_ptr logger,std::string filename,bool append,std::string pattern);
-  void log_add_rollingfile_appender(gr_logger_ptr logger,std::string filename,size_t filesize,int bkup_index,bool append,mode_t mode,std::string pattern);
-
-  void log_notice(gr_logger_ptr logger,std::string msg);
-  void log_debug(gr_logger_ptr logger,std::string msg);
-  void log_info(gr_logger_ptr logger,std::string msg);
-  void log_warn(gr_logger_ptr logger,std::string msg);
-  void log_error(gr_logger_ptr logger,std::string msg);
-  void log_crit(gr_logger_ptr logger,std::string msg);
-  void log_emerg(gr_logger_ptr logger,std::string msg);
-  void log_errorIF(gr_logger_ptr logger,bool cond,std::string msg);
-  void log_assert(gr_logger_ptr logger,bool cond,std::string msg);
-
-  void get_logger_names(std::vector<std::string>& names);
-  void reset_configuration();
-
+ public:
+  gr_logger(std::string logger_name);
+  void set_level(std::string level){GR_LOG_SET_LEVEL(d_logger,level);}
+  void get_level(std::string &level){GR_LOG_GET_LEVEL(d_logger,level);}
+  void debug(std::string msg){GR_LOG_DEBUG(d_logger,msg);};
+  void info(std::string msg){GR_LOG_INFO(d_logger,msg);};
+  void notice(std::string msg){GR_LOG_NOTICE(d_logger,msg);};
+  void warn(std::string msg){GR_LOG_WARN(d_logger,msg);};
+  void error(std::string msg){GR_LOG_ERROR(d_logger,msg);};
+  void crit(std::string msg){GR_LOG_CRIT(d_logger,msg);};
+  void alert(std::string msg){GR_LOG_ALERT(d_logger,msg);};
+  void fatal(std::string msg){GR_LOG_FATAL(d_logger,msg);};
+  void emerg(std::string msg){GR_LOG_EMERG(d_logger,msg);};
+  void errorIF(bool cond,std::string msg){GR_LOG_ERRORIF(d_logger,cond,msg);};
+  void log_assert(bool cond,std::string msg){GR_LOG_ASSERT(d_logger,cond,msg);};
+  void add_console_appender(std::string target,std::string pattern);
+  void add_file_appender(std::string filename,bool append,std::string pattern);
+  void add_rollingfile_appender(std::string filename,size_t filesize,int bkup_index,bool append,mode_t mode,std::string pattern);
 };
 
-#endif /* HAVE_LOG4CPP */
-#endif /* ENABLE_GR_LOG */
+
-- 
cgit v1.2.3