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()
30 while (!fgStream.eof()) {
32 if (scanStatus==0 && iter.compare(fgKeyOrigin)==0) {
33 // idicate scan of origin message
36 } else if (scanStatus==1 && iter.compare(fgKeyKeyword)==0) {
37 // idicate scan of keyword message
40 } else if (scanStatus==2 && iter.compare(fgKeyMessage)==0) {
46 if (!origin.empty()) origin+=" ";
50 if (!keyword.empty()) keyword+=" ";
54 // if we have come here already for the first word, we don't
55 // expect origin and keyword any more
57 if (!message.empty()) message+=" ";
62 // flush the string stream and send out through the logging system
65 fgHLTLogging.Logging(kHLTLogDebug, origin.c_str(), keyword.c_str(), message.c_str());
68 fgHLTLogging.Logging(kHLTLogInfo, origin.c_str(), keyword.c_str(), message.c_str());
71 fgHLTLogging.Logging(kHLTLogWarning, origin.c_str(), keyword.c_str(), message.c_str());
74 fgHLTLogging.Logging(kHLTLogError, origin.c_str(), keyword.c_str(), message.c_str());
78 fgHLTLogging.Logging(kHLTLogFatal, origin.c_str(), keyword.c_str(), message.c_str());