int AliHLTLogging::InitAliLogTrap(AliHLTComponentHandler* pHandler)
{
// see header file for class documentation
+ // init the AliRoot logging trap
+ // AliLog messages are redirected to PubSub,
int iResult=0;
if (pHandler) {
+ // set temporary loglevel of component handler
AliHLTComponentLogSeverity loglevel=pHandler->GetLocalLoggingLevel();
pHandler->SetLocalLoggingLevel(kHLTLogError);
- pHandler->LoadLibrary("libAliHLTUtil.so");
+
+ // load library containing AliRoot dependencies and initialization handler
+ pHandler->LoadLibrary(ALILOG_WRAPPER_LIBRARY, 0/* do not activate agents */);
+
+ // restore loglevel
pHandler->SetLocalLoggingLevel(loglevel);
- InitAliDynamicMessageCallback pFunc=(InitAliDynamicMessageCallback)pHandler->FindSymbol("libAliHLTUtil.so", "InitAliDynamicMessageCallback");
+
+ // find the symbol
+ InitAliDynamicMessageCallback pFunc=(InitAliDynamicMessageCallback)pHandler->FindSymbol(ALILOG_WRAPPER_LIBRARY, "InitAliDynamicMessageCallback");
if (pFunc) {
iResult=(*pFunc)();
} else {
return iResult;
}
+int AliHLTLogging::InitAliLogFunc(AliHLTComponentHandler* pHandler)
+{
+ // see header file for class documentation
+ int iResult=0;
+ if (pHandler) {
+ // set temporary loglevel of component handler
+ AliHLTComponentLogSeverity loglevel=pHandler->GetLocalLoggingLevel();
+ pHandler->SetLocalLoggingLevel(kHLTLogError);
+
+ // load library containing AliRoot dependencies and initialization handler
+ pHandler->LoadLibrary(ALILOG_WRAPPER_LIBRARY, 0/* do not activate agents */);
+
+ // restore loglevel
+ pHandler->SetLocalLoggingLevel(loglevel);
+
+ // find the symbol
+ fgAliLoggingFunc=(AliHLTLogging::AliHLTDynamicMessage)pHandler->FindSymbol(ALILOG_WRAPPER_LIBRARY, "AliDynamicMessage");
+ if (fgAliLoggingFunc==NULL) {
+ Message(NULL, kHLTLogError, "AliHLTLogging::InitAliLogFunc", "init logging",
+ "symbol lookp failure: can not find AliDynamicMessage, switching to HLT logging system");
+ iResult=-ENOSYS;
+ }
+ } else {
+ iResult=-EINVAL;
+ }
+
+ return iResult;
+}
+
int AliHLTLogging::Message(void *param, AliHLTComponentLogSeverity severity,
const char* origin, const char* keyword,
const char* message)
case kHLTLogFatal:
strSeverity="fatal";
break;
+ case kHLTLogImportant:
+ strSeverity="notify";
+ break;
default:
break;
}
return fLocalLogFilter;
}
-int AliHLTLogging::CheckGroup(const char* originClass) const
+int AliHLTLogging::CheckGroup(const char* /*originClass*/) const
{
// see header file for class documentation