2 // Original: AliHLTLog.cxx,v 1.1 2004/05/14 09:37:22 loizides
4 #include "AliHLTTPCLog.h"
6 AliHLTTPCLog::TLogLevel AliHLTTPCLog::fgLevel=AliHLTTPCLog::kNone;
8 const char* AliHLTTPCLog::kEnd = "";
9 const char* AliHLTTPCLog::kPrec = "";
10 const char* AliHLTTPCLog::kHex = "";
11 const char* AliHLTTPCLog::kDec = "";
13 const char* AliHLTTPCLog::fgKeyOrigin ="__origin";
14 const char* AliHLTTPCLog::fgKeyKeyword="__key";
15 const char* AliHLTTPCLog::fgKeyMessage="__message";
17 stringstream AliHLTTPCLog::fgStream;
19 AliHLTLogging AliHLTTPCLog::fgHLTLogging;
21 const char* AliHLTTPCLog::Flush()
23 // see header file for class documentation
31 while (!fgStream.eof()) {
33 if (scanStatus==0 && iter.compare(fgKeyOrigin)==0) {
34 // idicate scan of origin message
37 } else if (scanStatus==1 && iter.compare(fgKeyKeyword)==0) {
38 // idicate scan of keyword message
41 } else if (scanStatus==2 && iter.compare(fgKeyMessage)==0) {
47 if (!origin.empty()) origin+=" ";
51 if (!keyword.empty()) keyword+=" ";
55 // if we have come here already for the first word, we don't
56 // expect origin and keyword any more
58 if (!message.empty()) message+=" ";
63 // flush the string stream and send out through the logging system
66 fgHLTLogging.Logging(kHLTLogDebug, origin.c_str(), keyword.c_str(), message.c_str());
69 fgHLTLogging.Logging(kHLTLogInfo, origin.c_str(), keyword.c_str(), message.c_str());
72 fgHLTLogging.Logging(kHLTLogWarning, origin.c_str(), keyword.c_str(), message.c_str());
75 fgHLTLogging.Logging(kHLTLogError, origin.c_str(), keyword.c_str(), message.c_str());
79 fgHLTLogging.Logging(kHLTLogFatal, origin.c_str(), keyword.c_str(), message.c_str());