47 #include "StDbWrappedMessenger.hh"
50 #include "StUtilities/StMessageManager.h"
54 StDbWrappedMessenger::StDbWrappedMessenger() {
55 mMessenger=StMessageManager::Instance();
61 StDbWrappedMessenger::printMessage(
const char* message, StDbMessLevel dbLevel,
int lineNumber,
const char* className,
const char* methodName) {
63 if (dbLevel<mdbLevel)
return;
68 std::ostringstream ostr;
69 ostr << className <<
"::" << methodName <<
" line=" << lineNumber <<
" " << message;
71 std::string str = ostr.str();
80 LOG_DEBUG << str << endm;
86 LOG_WARN << str << endm;
92 LOG_INFO << str << endm;
98 LOG_ERROR << str << endm;
104 LOG_INFO << str << endm;
116 StDbWrappedMessenger::printMessage(
const char* message,
const char* levelString,
int lineNumber,
const char* className,
const char* methodName) {
125 int n = strlen(message)+1000;
126 char * str =
new char[n];
128 sprintf(str,
"%s::%s line=%d %s",className,methodName,lineNumber,message);
129 mMessenger->Message(str,levelString);