]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
restoring backward compatibility for the AliLog trap after recent changes in AliLog...
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 3 Mar 2010 14:33:46 +0000 (14:33 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 3 Mar 2010 14:33:46 +0000 (14:33 +0000)
HLT/configure.ac
HLT/rec/AliHLTDynamicAliLog.cxx

index c0882a4b48282afb9384e8b431b14a37aef98532..24844780eb541bfe3ec31a7861f4736d62b4dc1a 100644 (file)
@@ -234,15 +234,22 @@ if test ! "x$have_aliroot" = "xno" ; then
 
   dnl
   dnl check whether AliLog supports notification callback
+  dnl 2010-03-03: revision 38921 introduces AliLog::GetRootLogger in order to make AliLog
+  dnl a pure sigleton, introduce a 2-level check here
   dnl
   LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
   have_alilog_notification=no
   if test ! "x$have_aliroot" = "xno" ; then
   AC_MSG_CHECKING([whether AliLog supports notification callback])
   AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliLog.h>], 
-                                 [AliLog::AliLogNotification fct])],
-                                  [have_alilog_notification=yes], 
-                                 [AC_DEFINE(NO_ALILOG_NOTIFICATION)])
+                                 [AliLog* logger=AliLog::GetRootLogger();])],
+                                  [have_alilog_notification=yes],
+                                 [AC_DEFINE(NO_ALILOG_GETROOTLOGGER)
+                                 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliLog.h>], 
+                                                                 [AliLog::AliLogNotification fct])],
+                                                                 [have_alilog_notification=yes], 
+                                                                 [AC_DEFINE(NO_ALILOG_NOTIFICATION)])
+                                 ])
   AC_MSG_RESULT([$have_alilog_notification])
   fi
 
index 5ae47775ac45ed34d1cb43486530843fcd47d6bd..88d29c94edfd5353464a8c42abe65e682a65062d 100644 (file)
@@ -134,7 +134,11 @@ extern "C" int InitAliDynamicMessageCallback()
   // older versions of AliLog does not support the notification callback and
   // stringstreams, but they support the logging macros in general
 #ifndef NO_ALILOG_NOTIFICATION
+#ifndef NO_ALILOG_GETROOTLOGGER
   AliLog* log = AliLog::GetRootLogger();
+#else
+  AliLog* log = new AliLog;
+#endif //NO_ALILOG_GETROOTLOGGER
   log->SetLogNotification(LogNotification);
   log->SetStreamOutput(&AliHLTLogging::fgLogstr);
   log->SetPrintScope(true);