]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/BASE/AliHLTComponentHandler.cxx
adaption to new logging class, added functionality to AliHLTSystem to build a task...
[u/mrichter/AliRoot.git] / HLT / BASE / AliHLTComponentHandler.cxx
index 8e361d7054bfa073c76594fad934141c9aba5cf9..7dfeef0f02662fdf30cbb4a6543ee835d05bf51b 100644 (file)
@@ -92,8 +92,15 @@ int AliHLTComponentHandler::CreateComponent(const Char_t* componentID, void* env
     if (pSample!=NULL) {
       component=pSample->Spawn();
       if (component) {
+       Logging(kHLTLogDebug, "BASE", "Component Handler", "component \"%s\" created (%p)", componentID, component);
        component->Init(&fEnvironment, environ_param, argc, argv);
+      } else {
+       Logging(kHLTLogError, "BASE", "Component Handler", "can not spawn component \"%s\"", componentID);
+       iResult=-ENOENT;
       }
+    } else {
+      Logging(kHLTLogWarning, "BASE", "Component Handler", "can not find component \"%s\"", componentID);
+      iResult=-ENOENT;
     }
   } else {
     iResult=-EINVAL;
@@ -201,12 +208,3 @@ int AliHLTComponentHandler::UnloadLibraries()
   }
   return iResult;
 }
-
-int AliHLTComponentHandler::Logging(AliHLTComponent_LogSeverity severity, const char* origin, const char* keyword, const char* format, ... ) {
-  if (fEnvironment.fLoggingFunc) {
-    va_list args;
-    va_start(args, format);
-    return (*fEnvironment.fLoggingFunc)( fEnvironment.fParam, severity, origin, keyword, AliHLTSystem::BuildLogString(format, args));
-  }
-  return -ENOSYS;
-}