100 static char const dummy[] =
"dd-Mon-yyyy hh:mm:ss TZN ";
101 char ts[
sizeof(dummy)];
105 strftime(ts,
sizeof(dummy),
"%d-%b-%Y %H:%M:%S %Z", localtime_r(&t, &timebuf));
108 #ifdef STRIP_TRAILING_BLANKS_IN_TIMEZONE 111 unsigned int b = strlen(ts);
112 while (ts[--b] ==
' ') {
132 wantSubroutine(
true),
134 wantSomeContext(
true),
136 wantFullContext(
false),
137 wantTimeSeparate(
false),
138 wantEpilogueSeparate(
false),
141 #ifdef ELoutputCONSTRUCTOR_TRACE 142 std::cerr <<
"Constructor for ELoutput()\n";
145 emitToken(
"\n=================================================",
true);
146 emitToken(
"\nMessage Log File written by MessageLogger service \n");
147 emitToken(
"\n=================================================\n",
true);
167 #ifdef ELoutputCONSTRUCTOR_TRACE 168 std::cerr <<
"Constructor for ELoutput( os )\n";
174 emitToken(
"\n=================================================",
true);
175 emitToken(
"\nMessage Log File written by MessageLogger service \n");
176 emitToken(
"\n=================================================\n",
true);
197 #ifdef ELoutputCONSTRUCTOR_TRACE 198 std::cerr <<
"Constructor for ELoutput( " << fileName <<
" )\n";
203 #ifdef ELoutputCONSTRUCTOR_TRACE 204 std::cerr <<
" Testing if os is owned\n";
206 #ifdef ELoutputCONSTRUCTOR_TRACE 207 std::cerr <<
" About to do first emit\n";
211 emitToken(
"\n=======================================================",
true);
217 #ifdef ELoutputCONSTRUCTOR_TRACE 221 #ifdef ELoutputCONSTRUCTOR_TRACE 225 emitToken(
"\n=======================================================",
true);
226 emitToken(
"\n%MSG** Logging to cerr is being substituted");
229 emitToken(
"\" which could not be opened for write or append.\n");
235 emitToken(
"\n=======================================================\n",
true);
239 #ifdef ELoutputCONSTRUCTOR_TRACE 240 std::cerr <<
"Constructor for ELoutput completed.\n";
261 #ifdef ELoutputCONSTRUCTOR_TRACE 262 std::cerr <<
"Copy constructor for ELoutput\n";
282 #ifdef ELoutputCONSTRUCTOR_TRACE 283 std::cerr <<
"Destructor for ELoutput\n";
296 #ifdef ELoutputTRACE_LOG 297 std::cerr <<
" =:=:=: Log to an ELoutput \n";
303 std::cerr <<
" =:=:=: Log to an ELoutput \n" 306 <<
" id = " <<
xid.
id <<
"\n";
319 #ifdef ELoutputTRACE_LOG 320 std::cerr <<
" =:=:=: Limits table work done \n";
337 #ifdef ELoutputTRACE_LOG 344 std::ostringstream
s;
350 #ifdef OUTPUT_FORMATTED_ERROR_MESSAGES 354 ELlist_string::const_iterator it;
355 for (it = msg.
items().begin(); it != msg.
items().end(); ++it) {
356 #ifdef ELoutputTRACE_LOG 357 std::cerr <<
" =:=:=: Item: " << *it <<
'\n';
366 bool needAspace =
true;
393 #ifdef ELoutputTRACE_LOG 394 std::cerr <<
" =:=:=: Module and Subroutine done \n";
414 #ifdef ELoutputTRACE_LOG 415 std::cerr <<
" =:=:=: TimeStamp done \n";
429 #ifdef ELoutputTRACE_LOG 430 std::cerr <<
" =:=:=: fullContext done: \n";
434 #ifdef ELoutputTRACE_LOG 454 #ifdef ELoutputTRACE_LOG 455 std::cerr <<
" =:=:=: Trace routine done: \n";
458 #ifndef OUTPUT_FORMATTED_ERROR_MESSAGES 463 ELlist_string::const_iterator it;
465 for (it = msg.
items().begin(); it != msg.
items().end(); ++it) {
466 #ifdef ELoutputTRACE_LOG 467 std::cerr <<
" =:=:=: Item: " << *it <<
'\n';
471 if (!insertNewlineAfterHeader && (item_count == 3)) {
497 #ifdef ELoutputTRACE_LOG 498 std::cerr <<
" =:=:=: log(msg) done: \n";
512 #ifdef ELoutput_EMIT_TRACE 514 std::cerr <<
"[][][] in emit: s.length() " << s.length() <<
'\n';
518 if (s.length() == 0) {
520 (*os) <<
newline << std::flush;
528 second = (s.length() < 2) ?
'\0' : s[1];
529 last = (s.length() < 2) ?
'\0' : s[s.length() - 1];
530 last2 = (s.length() < 3) ?
'\0' : s[s.length() - 2];
536 if (first ==
'\n' || (charsOnLine + static_cast<int>(s.length())) >
lineLength) {
537 #ifdef ELoutput_EMIT_TRACE 538 std::cerr <<
"[][][] in emit: about to << to *os \n";
540 #ifdef HEADERS_BROKEN_INTO_LINES_AND_INDENTED 543 charsOnLine = indent.length();
552 (*os) << s.substr(1);
557 #ifdef ELoutput_EMIT_TRACE 558 std::cerr <<
"[][][] in emit: about to << s to *os: " << s <<
" \n";
564 if (last ==
'\n' || last2 ==
'\n') {
568 charsOnLine = indent.length() + 1;
572 (*os) <<
newline << std::flush;
575 charsOnLine += s.length();
583 #ifdef ELoutput_EMIT_TRACE 584 std::cerr <<
"[][][] in emit: completed \n";
626 emitToken(
"\n=======================================================",
true);
627 emitToken(
"\nError Log changed to this stream\n");
630 emitToken(
"\n=======================================================\n",
true);
635 emitToken(
"\n=======================================================",
true);
636 emitToken(
"\nError Log changed to this file\n");
639 emitToken(
"\n=======================================================\n",
true);
ELslProxy< ELdebugGen > const ELdebug
ELseverityLevel traceThreshold
const ELstring & idOverflow() const
std::unordered_set< std::string > ignoreThese
void suppressText() override
virtual bool thisShouldBeIgnored(const ELstring &s) const
ELseverityLevel threshold
void separateEpilogue() override
U second(std::pair< T, U > const &p)
const ELstring getSymbol() const
static ELstring formatTime(const time_t t)
const ELextendedID & xid() const
void includeModule() override
void includeSubroutine() override
bool add(const ELextendedID &xid)
void includeContext() override
void attachEpilogue() override
void suppressSerial() override
std::unordered_set< std::string > respondToThese
void separateTime() override
void suppressTime() override
std::shared_ptr< std::ostream > os
const ELlist_string & items() const
ELslProxy< ELsevereGen > const ELsevere
void useFullContext() override
void includeSerial() override
void emitToken(const ELstring &s, bool nl=false)
void attachTime() override
void suppressModule() override
void includeTime() override
void useContext() override
bool respondToMostModules
bool log(const edm::ErrorObj &msg) override
bool wantEpilogueSeparate
T first(std::pair< T, U > const &p)
void suppressContext() override
void changeFile(std::ostream &os) override
void includeText() override
void suppressSubroutine() override