CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | Friends
edm::ELlog4cplus Class Reference

#include <ELlog4cplus.h>

Inheritance diagram for edm::ELlog4cplus:
edm::service::ELdestination evf::RunBase

Public Member Functions

virtual ELlog4cplusclone () const
 
 ELlog4cplus ()
 
 ELlog4cplus (const ELlog4cplus &orig)
 
virtual bool log (const ErrorObj &msg)
 
void setAppl (xdaq::Application *a)
 
void xxxxSet (int i)
 
void xxxxShout ()
 
virtual ~ELlog4cplus ()
 
- Public Member Functions inherited from edm::service::ELdestination
 ELdestination ()
 
virtual void finish ()
 
virtual ELstring getNewline () const
 
virtual ~ELdestination ()
 

Protected Member Functions

virtual void attachEpilogue ()
 
virtual void attachTime ()
 
virtual void emit (const ELstring &s, bool nl=false)
 
virtual void includeContext ()
 
virtual void includeModule ()
 
virtual void includeSerial ()
 
virtual void includeSubroutine ()
 
virtual void includeText ()
 
virtual void includeTime ()
 
ELlog4cplusoperator= (const ELlog4cplus &orig)
 
virtual void separateEpilogue ()
 
virtual void separateTime ()
 
virtual void summarization (const ELstring &fullTitle, const ELstring &sumLines)
 
virtual void suppressContext ()
 
virtual void suppressModule ()
 
virtual void suppressSerial ()
 
virtual void suppressSubroutine ()
 
virtual void suppressText ()
 
virtual void suppressTime ()
 
virtual void useContext ()
 
virtual void useFullContext ()
 
- Protected Member Functions inherited from edm::service::ELdestination
virtual void changeFile (std::ostream &os)
 
virtual void changeFile (const ELstring &filename)
 
virtual void clearSummary ()
 
virtual void excludeModule (ELstring const &moduleName)
 
virtual void filterModule (ELstring const &moduleName)
 
virtual void flush ()
 
virtual void ignoreModule (ELstring const &moduleName)
 
virtual void respondToModule (ELstring const &moduleName)
 
virtual void setTableLimit (int n)
 
virtual std::map< ELextendedID,
StatsCount
statisticsMap () const
 
virtual void summary (ELdestControl &dest, const ELstring &title="")
 
virtual void summary (std::ostream &os, const ELstring &title="")
 
virtual void summary (ELstring &s, const ELstring &title="")
 
virtual void summary ()
 
virtual void summaryForJobReport (std::map< std::string, double > &sm)
 
virtual bool thisShouldBeIgnored (const ELstring &s) const
 
virtual void wipe ()
 
virtual void zero ()
 

Protected Attributes

int charsOnLine
 
std::ostringstream * os
 
std::ostringstream os_
 
bool osIsOwned
 
bool wantEpilogueSeparate
 
bool wantFullContext
 
bool wantModule
 
bool wantSerial
 
bool wantSomeContext
 
bool wantSubroutine
 
bool wantText
 
bool wantTimeSeparate
 
bool wantTimestamp
 
ELextendedID xid
 
int xxxxInt
 
- Protected Attributes inherited from edm::service::ELdestination
bool ignoreMostModules
 
ELset_string ignoreThese
 
ELstring indent
 
ELlimitsTable limits
 
int lineLength
 
ELstring newline
 
ELstring preamble
 
bool respondToMostModules
 
ELset_string respondToThese
 
ELseverityLevel threshold
 
ELseverityLevel traceThreshold
 

Private Attributes

xdaq::Application * appl_
 

Friends

class service::ELdestControl
 

Additional Inherited Members

- Static Public Attributes inherited from evf::RunBase
static xdata::UnsignedInteger32 runNumber_ =0
 
static std::string sourceId_ ="Offline"
 
- Static Protected Attributes inherited from edm::service::ELdestination
static const int defaultLineLength = 80
 

Detailed Description

Definition at line 51 of file ELlog4cplus.h.

Constructor & Destructor Documentation

edm::ELlog4cplus::ELlog4cplus ( )

Definition at line 84 of file ELlog4cplus.cc.

References dtNoiseDBValidation_cfg::cerr, emit(), edm::formatTime(), edm::service::ELdestination::lineLength, and cond::rpcobgas::time.

Referenced by clone().

85 : ELdestination ( )
86 , os ( &os_ )
87 , osIsOwned ( false )
88 , charsOnLine ( 0 )
89 , xid ( )
90 , wantTimestamp ( true )
91 , wantModule ( true )
92 , wantSubroutine ( true )
93 , wantText ( true )
94 , wantSomeContext ( true )
95 , wantSerial ( false )
96 , wantFullContext ( false )
97 , wantTimeSeparate ( false )
98 , wantEpilogueSeparate( false )
99 , xxxxInt ( 0 )
100 , appl_ ( 0 )
101 {
102  // makeFileAppender(); // this is not needed/wanted. An appender must be provided by the application itself
103 
104  #ifdef ELlog4cplusCONSTRUCTOR_TRACE
105  std::cerr << "Constructor for ELlog4cplus()\n";
106  #endif
107 
108  lineLength = 32000;
109 
110  emit( "\n=======================================================", true );
111  emit( "\nMessageLogger service established\n" );
112  emit( formatTime(time(0)), true );
113  emit( "\n=======================================================\n", true );
114 
115 } // ELlog4cplus()
std::ostringstream * os
Definition: ELlog4cplus.h:118
std::ostringstream os_
Definition: ELlog4cplus.h:117
virtual void emit(const ELstring &s, bool nl=false)
Definition: ELlog4cplus.cc:395
xdaq::Application * appl_
Definition: ELlog4cplus.h:143
static char * formatTime(const time_t t)
Definition: ELlog4cplus.cc:57
ELextendedID xid
Definition: ELlog4cplus.h:121
bool wantEpilogueSeparate
Definition: ELlog4cplus.h:124
edm::ELlog4cplus::ELlog4cplus ( const ELlog4cplus orig)

Definition at line 119 of file ELlog4cplus.cc.

References dtNoiseDBValidation_cfg::cerr, edm::service::ELdestination::ignoreMostModules, edm::service::ELdestination::ignoreThese, edm::service::ELdestination::indent, edm::service::ELdestination::limits, edm::service::ELdestination::lineLength, edm::service::ELdestination::newline, osIsOwned, edm::service::ELdestination::preamble, edm::service::ELdestination::respondToMostModules, edm::service::ELdestination::respondToThese, edm::service::ELdestination::threshold, and edm::service::ELdestination::traceThreshold.

120 : ELdestination ( )
121 , os ( &os_ )
122 , osIsOwned ( orig.osIsOwned )
123 , charsOnLine ( orig.charsOnLine )
124 , xid ( orig.xid )
125 , wantTimestamp ( orig.wantTimestamp )
126 , wantModule ( orig.wantModule )
127 , wantSubroutine ( orig.wantSubroutine )
128 , wantText ( orig.wantText )
129 , wantSomeContext ( orig.wantSomeContext )
130 , wantSerial ( orig.wantSerial )
131 , wantFullContext ( orig.wantFullContext )
132 , wantTimeSeparate ( orig.wantTimeSeparate )
133 , wantEpilogueSeparate( orig.wantEpilogueSeparate )
134 , xxxxInt ( orig.xxxxInt )
135 , appl_ ( orig.appl_ )
136 {
137 
138  #ifdef ELlog4cplusCONSTRUCTOR_TRACE
139  std::cerr << "Copy constructor for ELlog4cplus\n";
140  #endif
141 
142  // mf 6/15/01 fix of Bug 005
143  threshold = orig.threshold;
144  traceThreshold = orig.traceThreshold;
145 
146  limits = orig.limits;
147  preamble = orig.preamble;
148  newline = orig.newline;
149  indent = orig.indent;
150  lineLength = orig.lineLength;
151 
152  ignoreMostModules = orig.ignoreMostModules;
153  respondToThese = orig.respondToThese;
154  respondToMostModules = orig.respondToMostModules;
155  ignoreThese = orig.ignoreThese;
156 
157  // ownership, if any, passes to new copy:
158  const_cast<ELlog4cplus &>(orig).osIsOwned = false;
159 
160 } // ELlog4cplus()
ELseverityLevel traceThreshold
std::ostringstream * os
Definition: ELlog4cplus.h:118
std::ostringstream os_
Definition: ELlog4cplus.h:117
xdaq::Application * appl_
Definition: ELlog4cplus.h:143
ELextendedID xid
Definition: ELlog4cplus.h:121
bool wantEpilogueSeparate
Definition: ELlog4cplus.h:124
edm::ELlog4cplus::~ELlog4cplus ( )
virtual

Definition at line 163 of file ELlog4cplus.cc.

References dtNoiseDBValidation_cfg::cerr, os, and osIsOwned.

163  {
164 
165  #ifdef ELlog4cplusCONSTRUCTOR_TRACE
166  std::cerr << "Destructor for ELlog4cplus\n";
167  #endif
168 
169  if ( osIsOwned ) { // we have an ofstream
170  ((std::ofstream*)os)->close();
171  delete os;
172  }
173 
174 } // ~ELlog4cplus()
std::ostringstream * os
Definition: ELlog4cplus.h:118

Member Function Documentation

void edm::ELlog4cplus::attachEpilogue ( )
protectedvirtual

Reimplemented from edm::service::ELdestination.

Definition at line 495 of file ELlog4cplus.cc.

References wantEpilogueSeparate.

495 { wantEpilogueSeparate = false; }
bool wantEpilogueSeparate
Definition: ELlog4cplus.h:124
void edm::ELlog4cplus::attachTime ( )
protectedvirtual

Reimplemented from edm::service::ELdestination.

Definition at line 492 of file ELlog4cplus.cc.

References wantTimeSeparate.

492 { wantTimeSeparate = false; }
ELlog4cplus * edm::ELlog4cplus::clone ( void  ) const
virtual

Implements edm::service::ELdestination.

Definition at line 182 of file ELlog4cplus.cc.

References ELlog4cplus().

182  {
183 
184  return new ELlog4cplus( *this );
185 
186 } // clone()
void edm::ELlog4cplus::emit ( const ELstring s,
bool  nl = false 
)
protectedvirtual

Definition at line 395 of file ELlog4cplus.cc.

References dtNoiseDBValidation_cfg::cerr, charsOnLine, edm::first(), edm::service::ELdestination::indent, prof2calltree::last, edm::service::ELdestination::lineLength, edm::service::ELdestination::newline, alignCSCRings::s, and edm::second().

Referenced by Vispa.Share.ThreadChain.ThreadChain::addCommand(), Vispa.Views.PropertyView.PropertyView::addProperty(), Vispa.Gui.BoxContentDialog.BoxContentDialog::apply(), Vispa.Plugins.ConfigEditor.CodeTableView.CodeTableView::applyButtonClicked(), Vispa.Views.LineDecayView.LineDecayContainer::autolayoutPostprocess(), Vispa.Gui.WidgetContainer.WidgetContainer::autosize(), Vispa.Gui.PortConnection.PointToPointConnection::delete(), Vispa.Gui.VispaWidget.VispaWidget::delete(), Vispa.Views.WidgetView.WidgetView::deselectAllWidgets(), ELlog4cplus(), Vispa.Main.MainWindow.MainWindow::event(), Vispa.Gui.FindDialog.FindDialog::filter(), Vispa.Gui.FindDialog.FindDialog::findNext(), Vispa.Gui.FindDialog.FindDialog::findPrevious(), Vispa.Views.PropertyView.TextEdit::focusOutEvent(), Vispa.Plugins.ConfigEditor.CodeTableView.CodeTableView::importButtonClicked(), Vispa.Views.TreeView.TreeView::itemSelectionChanged(), Vispa.Views.TableView.TableView::itemSelectionChanged(), Vispa.Views.PropertyView.ComboBoxReturn::keyPressEvent(), Vispa.Plugins.ConfigEditor.CodeTableView.CodeTableView::keyPressEvent(), Vispa.Gui.PortConnection.PointToPointConnection::keyPressEvent(), Vispa.Gui.VispaWidget.VispaWidget::keyPressEvent(), log(), Vispa.Views.LineDecayView.ParticleWidget::mouseDoubleClickEvent(), Vispa.Gui.Header.Header::mousePressEvent(), Vispa.Views.AbstractView.NoneView::mousePressEvent(), Vispa.Gui.SimpleDraggableTreeWidget.SimpleDraggableTreeWidget::mousePressEvent(), Vispa.Views.WidgetView.WidgetView::mousePressEvent(), Vispa.Views.TreeView.TreeView::mousePressEvent(), Vispa.Views.RootCanvasView.RootCanvasView::mousePressEvent(), Vispa.Views.TableView.TableView::mousePressEvent(), Vispa.Views.LineDecayView.ParticleWidget::mousePressEvent(), Vispa.Gui.VispaWidget.VispaWidget::mouseReleaseEvent(), Vispa.Plugins.EventBrowser.EventBrowserTabController.EventBrowserTabController::navigate(), Vispa.Views.LineDecayView.LineDecayView::onSelected(), Vispa.Plugins.ConfigEditor.CodeTableView.CodeTableView::removeButtonClicked(), Vispa.Views.PropertyView.PropertyView::removeProperty(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Share.ThreadChain.ThreadChain::run(), Vispa.Gui.ZoomableScrollArea.ZoomableScrollArea::setZoom(), summarization(), Vispa.Views.BoxDecayView.BoxDecayView::toggleCollapsed(), Vispa.Views.PropertyView.PropertyView::valueChanged(), Vispa.Views.PropertyView.TextEditWithButtonProperty::valueChanged(), Vispa.Gui.ZoomableScrollArea.ZoomableScrollArea::wheelEvent(), Vispa.Views.WidgetView.WidgetView::widgetDoubleClicked(), and Vispa.Views.WidgetView.WidgetView::widgetSelected().

395  {
396 
397  #ifdef ELlog4cplus_EMIT_TRACE
398  std::cerr << "[][][] in emit: charsOnLine is " << charsOnLine << '\n';
399  std::cerr << "[][][] in emit: s.length() " << s.length() << '\n';
400  std::cerr << "[][][] in emit: lineLength is " << lineLength << '\n';
401  #endif
402 
403  if (s.length() == 0) {
404  if ( nl ) {
405  (*os) << newline << std::flush;
406  charsOnLine = 0;
407  }
408  return;
409  }
410 
411  char first = s[0];
412  char second,
413  last,
414  last2;
415  second = (s.length() < 2) ? '\0' : s[1];
416  last = (s.length() < 2) ? '\0' : s[s.length()-1];
417  last2 = (s.length() < 3) ? '\0' : s[s.length()-2];
418  //checking -2 because the very last char is sometimes a ' ' inserted
419  //by ErrorLog::operator<<
420 
421  //Accounts for newline @ the beginning of the ELstring JV:2
422  if ( first == '\n'
423  || (charsOnLine + static_cast<int>(s.length())) > lineLength ) {
424  #ifdef ELlog4cplus_EMIT_TRACE
425  std::cerr << "[][][] in emit: about to << to *os \n";
426  #endif
427  (*os) << newline << indent;
428  charsOnLine = indent.length();
429  if (second != ' ') {
430  (*os) << ' ';
431  charsOnLine++;
432  }
433  if ( first == '\n' ) {
434  (*os) << s.substr(1);
435  }
436  else {
437  (*os) << s;
438  }
439  }
440 
441  #ifdef ELlog4cplus_EMIT_TRACE
442  std::cerr << "[][][] in emit: about to << s to *os: " << s << " \n";
443  #endif
444 
445  else {
446  (*os) << s;
447  }
448 
449  if (last == '\n' || last2 == '\n') { //accounts for newline @ end $$ JV:2
450  (*os) << indent; //of the ELstring
451  if (last != ' ')
452  (*os) << ' ';
453  charsOnLine = indent.length() + 1;
454  }
455 
456  if ( nl ) { (*os) << newline << std::flush; charsOnLine = 0; }
457  else { charsOnLine += s.length(); }
458 
459  #ifdef ELlog4cplus_EMIT_TRACE
460  std::cerr << "[][][] in emit: completed \n";
461  #endif
462 
463 } // emit()
U second(std::pair< T, U > const &p)
T first(std::pair< T, U > const &p)
void edm::ELlog4cplus::includeContext ( )
protectedvirtual

Reimplemented from edm::service::ELdestination.

Definition at line 482 of file ELlog4cplus.cc.

References wantSomeContext.

482 { wantSomeContext = true; }
void edm::ELlog4cplus::includeModule ( )
protectedvirtual

Reimplemented from edm::service::ELdestination.

Definition at line 473 of file ELlog4cplus.cc.

References wantModule.

473 { wantModule = true; }
void edm::ELlog4cplus::includeSerial ( )
protectedvirtual

Reimplemented from edm::service::ELdestination.

Definition at line 486 of file ELlog4cplus.cc.

References wantSerial.

486 { wantSerial = true; }
void edm::ELlog4cplus::includeSubroutine ( )
protectedvirtual

Reimplemented from edm::service::ELdestination.

Definition at line 476 of file ELlog4cplus.cc.

References wantSubroutine.

476 { wantSubroutine = true; }
void edm::ELlog4cplus::includeText ( )
protectedvirtual

Reimplemented from edm::service::ELdestination.

Definition at line 479 of file ELlog4cplus.cc.

References wantText.

479 { wantText = true; }
void edm::ELlog4cplus::includeTime ( )
protectedvirtual

Reimplemented from edm::service::ELdestination.

Definition at line 470 of file ELlog4cplus.cc.

References wantTimestamp.

470 { wantTimestamp = true; }
bool edm::ELlog4cplus::log ( const ErrorObj msg)
virtual

Reimplemented from edm::service::ELdestination.

Definition at line 189 of file ELlog4cplus.cc.

References edm::service::ELlimitsTable::add(), appl_, dtNoiseDBValidation_cfg::cerr, edm::service::ELcontextSupplier::context(), edm::ErrorObj::context(), edm::ELseverityLevel::ELsev_error, edm::ELseverityLevel::ELsev_info, edm::ELseverityLevel::ELsev_success, edm::ELseverityLevel::ELsev_warning, emit(), edm::formatTime(), edm::service::ELadministrator::getContextSupplier(), edm::ELseverityLevel::getLevel(), edm::ELseverityLevel::getSymbol(), edm::ELextendedID::id, edm::ErrorObj::idOverflow(), edm::service::ELadministrator::instance(), edm::ErrorObj::items(), edm::service::ELdestination::limits, edm::ELextendedID::module, os, edm::service::ELdestination::preamble, alignCSCRings::s, edm::ErrorObj::serial(), edm::ELextendedID::severity, edm::ELextendedID::subroutine, edm::service::ELdestination::thisShouldBeIgnored(), edm::service::ELdestination::threshold, edm::ErrorObj::timestamp(), edm::service::ELdestination::traceThreshold, wantEpilogueSeparate, wantFullContext, wantModule, wantSerial, wantSomeContext, wantSubroutine, wantText, wantTimeSeparate, wantTimestamp, edm::ErrorObj::xid(), and xid.

189  {
190  os->str(std::string());
191 
192  #ifdef ELlog4cplusTRACE_LOG
193  std::cerr << " =:=:=: Log to an ELlog4cplus \n";
194  #endif
195 
196  xid = msg.xid(); // Save the xid.
197 
198  // See if this message is to be acted upon, and add it to limits table
199  // if it was not already present:
200  //
201  if ( msg.xid().severity < threshold ) return false;
202  if ( thisShouldBeIgnored(xid.module) ) return false;
203  if ( ! limits.add( msg.xid() ) ) return false;
204 
205 #ifdef ELlog4cplusTRACE_LOG
206  std::cerr << " =:=:=: Limits table work done \n";
207 #endif
208 
209  // get log4cplus logger and establish (log4cplus) context
210  bool mustPop = false;
211 
212  log4cplus::Logger loghere = appl_ ? appl_->getApplicationLogger() :
213  log4cplus::Logger::getInstance(msg.xid().module.c_str());
214  LOG4CPLUS_DEBUG(loghere, "Message2log4cplus will use logger from appl_ ? "
215  << (appl_ ? "yes" : "no"));
216  if(appl_)
217  {
218  log4cplus::getNDC().push(msg.xid().module.c_str());
219  mustPop = true;
220  }
221  log4cplus::getNDC().push(msg.context().c_str());
222 
223  // Output the prologue:
224  //
225  emit( preamble );
226  emit( xid.severity.getSymbol() );
227  emit( " " );
228  emit( xid.id );
229  emit( msg.idOverflow() );
230  emit( ": " );
231 
232  #ifdef ELlog4cplusTRACE_LOG
233  std::cerr << " =:=:=: Prologue done \n";
234  #endif
235  // Output serial number of message:
236  //
237  if ( wantSerial ) {
238  std::ostringstream s;
239  s << msg.serial();
240  emit( "[serial #" + s.str() + ELstring("] ") );
241  }
242 
243  // Output each item in the message:
244  //
245  if ( wantText ) {
246  ELlist_string::const_iterator it;
247  for ( it = msg.items().begin(); it != msg.items().end(); ++it ) {
248  #ifdef ELlog4cplusTRACE_LOG
249  std::cerr << " =:=:=: Item: " << *it << '\n';
250  #endif
251  emit( *it );
252  }
253  }
254 
255  // Provide further identification:
256  //
257  bool needAspace = true;
258  if ( wantEpilogueSeparate ) {
259  if ( xid.module.length() + xid.subroutine.length() > 0 ) {
260  emit("\n");
261  needAspace = false;
262  }
263  else if ( wantTimestamp && !wantTimeSeparate ) {
264  emit("\n");
265  needAspace = false;
266  }
267  }
268  if ( wantModule && (xid.module.length() > 0) ) {
269  if (needAspace) { emit(ELstring(" ")); needAspace = false; }
270  emit( xid.module + ELstring(" ") );
271  }
272  if ( wantSubroutine && (xid.subroutine.length() > 0) ) {
273  if (needAspace) { emit(ELstring(" ")); needAspace = false; }
274  emit( xid.subroutine + "()" + ELstring(" ") );
275  }
276 
277  #ifdef ELlog4cplusTRACE_LOG
278  std::cerr << " =:=:=: Module and Subroutine done \n";
279  #endif
280 
281  // Provide time stamp:
282  //
283  if ( wantTimestamp ) {
284  if ( wantTimeSeparate ) {
285  emit( ELstring("\n") );
286  needAspace = false;
287  }
288  if (needAspace) { emit(ELstring(" ")); needAspace = false; }
289  emit( formatTime(msg.timestamp()) + ELstring(" ") );
290  }
291 
292  #ifdef ELlog4cplusTRACE_LOG
293  std::cerr << " =:=:=: TimeStamp done \n";
294  #endif
295 
296  // Provide the context information:
297  //
298  if ( wantSomeContext )
299  if (needAspace) { emit(ELstring(" ")); needAspace = false; }
300  #ifdef ELlog4cplusTRACE_LOG
301  std::cerr << " =:=:=:>> context supplier is at 0x"
302  << std::hex
304  std::cerr << " =:=:=:>> context is --- "
306  << '\n';
307  #endif
308  if ( wantFullContext ) {
309  emit( service::ELadministrator::instance()->getContextSupplier().fullContext());
310  #ifdef ELlog4cplusTRACE_LOG
311  std::cerr << " =:=:=: fullContext done: \n";
312  #endif
313  } else {
314  emit( service::ELadministrator::instance()->getContextSupplier().context());
315  #ifdef ELlog4cplusTRACE_LOG
316  std::cerr << " =:=:=: Context done: \n";
317  #endif
318  }
319 
320  // Provide traceback information:
321  //
322  if ( msg.xid().severity >= traceThreshold ) {
323  emit( ELstring("\n")
324  + service::ELadministrator::instance()->getContextSupplier().traceRoutine()
325  , true );
326  }
327  else { //else statement added JV:1
328  emit ("", true);
329  }
330  #ifdef ELlog4cplusTRACE_LOG
331  std::cerr << " =:=:=: Trace routine done: \n";
332  #endif
333 
334  // Done; message has been fully processed:
335  //
336 
337  #ifdef ELlog4cplusTRACE_LOG
338  std::cerr << " =:=:=: log(msg) done: \n";
339  #endif
340 
341  // std::cout << os->str() << "\n";
342 
343  switch(msg.xid().severity.getLevel())
344  {
346  {
347  // success is used for debug here
348  LOG4CPLUS_DEBUG(loghere,os->str());
349  break;
350  }
352  {
353  LOG4CPLUS_INFO(loghere,os->str());
354  break;
355  }
357  {
358  LOG4CPLUS_WARN(loghere,os->str());
359  break;
360  }
362  default:
363  {
364  LOG4CPLUS_ERROR(loghere,os->str());
365  break;
366  }
367  }
368  if(mustPop) log4cplus::getNDC().pop();
369  log4cplus::getNDC().pop();
370  return true;
371 
372 } // log()
ELseverityLevel traceThreshold
const ELcontextSupplier & getContextSupplier() const
ELseverityLevel severity
Definition: ELextendedID.h:36
std::ostringstream * os
Definition: ELlog4cplus.h:118
virtual bool thisShouldBeIgnored(const ELstring &s) const
const ELstring getSymbol() const
virtual void emit(const ELstring &s, bool nl=false)
Definition: ELlog4cplus.cc:395
bool add(const ELextendedID &xid)
xdaq::Application * appl_
Definition: ELlog4cplus.h:143
virtual ELstring context() const =0
ELstring subroutine
Definition: ELextendedID.h:38
static ELadministrator * instance()
static char * formatTime(const time_t t)
Definition: ELlog4cplus.cc:57
ELextendedID xid
Definition: ELlog4cplus.h:121
bool wantEpilogueSeparate
Definition: ELlog4cplus.h:124
std::string ELstring
Definition: ELstring.h:26
ELlog4cplus& edm::ELlog4cplus::operator= ( const ELlog4cplus orig)
protected
void edm::ELlog4cplus::separateEpilogue ( )
protectedvirtual

Reimplemented from edm::service::ELdestination.

Definition at line 494 of file ELlog4cplus.cc.

References wantEpilogueSeparate.

494 { wantEpilogueSeparate = true; }
bool wantEpilogueSeparate
Definition: ELlog4cplus.h:124
void edm::ELlog4cplus::separateTime ( )
protectedvirtual

Reimplemented from edm::service::ELdestination.

Definition at line 491 of file ELlog4cplus.cc.

References wantTimeSeparate.

491 { wantTimeSeparate = true; }
void edm::ELlog4cplus::setAppl ( xdaq::Application *  a)

Definition at line 531 of file ELlog4cplus.cc.

References a, appl_, and gather_cfg::cout.

Referenced by ML::MLlog4cplus::MLlog4cplus().

532 {
533  std::cout << "setting application pointer in ELlog4cplus" << std::endl;
534  appl_ = a;
535 }
xdaq::Application * appl_
Definition: ELlog4cplus.h:143
double a
Definition: hdecay.h:121
tuple cout
Definition: gather_cfg.py:121
void edm::ELlog4cplus::summarization ( const ELstring fullTitle,
const ELstring sumLines 
)
protectedvirtual

Reimplemented from edm::service::ELdestination.

Definition at line 502 of file ELlog4cplus.cc.

References emit(), geometryCSVtoXML::line, edm::service::ELdestination::lineLength, os, lumiQueryAPI::q, and indexGen::title.

505  {
506  const int titleMaxLength( 40 );
507 
508  // title:
509  //
510  ELstring title( fullTitle, 0, titleMaxLength );
511  int q = (lineLength - title.length() - 2) / 2;
512  ELstring line(q, '=');
513  emit( "", true );
514  emit( line );
515  emit( " " );
516  emit( title );
517  emit( " " );
518  emit( line, true );
519 
520  // body:
521  //
522  *os << sumLines;
523 
524  // finish:
525  //
526  emit( "", true );
527  emit( ELstring(lineLength, '='), true );
528 
529 } // summarization()
std::ostringstream * os
Definition: ELlog4cplus.h:118
virtual void emit(const ELstring &s, bool nl=false)
Definition: ELlog4cplus.cc:395
std::string ELstring
Definition: ELstring.h:26
void edm::ELlog4cplus::suppressContext ( )
protectedvirtual

Reimplemented from edm::service::ELdestination.

Definition at line 483 of file ELlog4cplus.cc.

References wantSomeContext.

483 { wantSomeContext = false; }
void edm::ELlog4cplus::suppressModule ( )
protectedvirtual

Reimplemented from edm::service::ELdestination.

Definition at line 474 of file ELlog4cplus.cc.

References wantModule.

474 { wantModule = false; }
void edm::ELlog4cplus::suppressSerial ( )
protectedvirtual

Reimplemented from edm::service::ELdestination.

Definition at line 485 of file ELlog4cplus.cc.

References wantSerial.

485 { wantSerial = false; }
void edm::ELlog4cplus::suppressSubroutine ( )
protectedvirtual

Reimplemented from edm::service::ELdestination.

Definition at line 477 of file ELlog4cplus.cc.

References wantSubroutine.

477 { wantSubroutine = false; }
void edm::ELlog4cplus::suppressText ( )
protectedvirtual

Reimplemented from edm::service::ELdestination.

Definition at line 480 of file ELlog4cplus.cc.

References wantText.

480 { wantText = false; }
void edm::ELlog4cplus::suppressTime ( )
protectedvirtual

Reimplemented from edm::service::ELdestination.

Definition at line 471 of file ELlog4cplus.cc.

References wantTimestamp.

471 { wantTimestamp = false; }
void edm::ELlog4cplus::useContext ( )
protectedvirtual

Reimplemented from edm::service::ELdestination.

Definition at line 489 of file ELlog4cplus.cc.

References wantFullContext.

489 { wantFullContext = false; }
void edm::ELlog4cplus::useFullContext ( )
protectedvirtual

Reimplemented from edm::service::ELdestination.

Definition at line 488 of file ELlog4cplus.cc.

References wantFullContext.

488 { wantFullContext = true; }
void edm::ELlog4cplus::xxxxSet ( int  i)

Definition at line 382 of file ELlog4cplus.cc.

References i, and xxxxInt.

382  {
383  xxxxInt = i;
384 }
int i
Definition: DBlmapReader.cc:9
void edm::ELlog4cplus::xxxxShout ( )

Definition at line 386 of file ELlog4cplus.cc.

References dtNoiseDBValidation_cfg::cerr, and xxxxInt.

386  {
387  std::cerr << "XXXX ELlog4cplus: " << xxxxInt << std::endl;
388 }

Friends And Related Function Documentation

friend class service::ELdestControl
friend

Definition at line 53 of file ELlog4cplus.h.

Member Data Documentation

xdaq::Application* edm::ELlog4cplus::appl_
private

Definition at line 143 of file ELlog4cplus.h.

Referenced by log(), and setAppl().

int edm::ELlog4cplus::charsOnLine
protected

Definition at line 120 of file ELlog4cplus.h.

Referenced by emit().

std::ostringstream* edm::ELlog4cplus::os
protected

Definition at line 118 of file ELlog4cplus.h.

Referenced by log(), summarization(), and ~ELlog4cplus().

std::ostringstream edm::ELlog4cplus::os_
protected

Definition at line 117 of file ELlog4cplus.h.

bool edm::ELlog4cplus::osIsOwned
protected

Definition at line 119 of file ELlog4cplus.h.

Referenced by ELlog4cplus(), and ~ELlog4cplus().

bool edm::ELlog4cplus::wantEpilogueSeparate
protected

Definition at line 124 of file ELlog4cplus.h.

Referenced by attachEpilogue(), log(), and separateEpilogue().

bool edm::ELlog4cplus::wantFullContext
protected

Definition at line 124 of file ELlog4cplus.h.

Referenced by log(), useContext(), and useFullContext().

bool edm::ELlog4cplus::wantModule
protected

Definition at line 124 of file ELlog4cplus.h.

Referenced by includeModule(), log(), and suppressModule().

bool edm::ELlog4cplus::wantSerial
protected

Definition at line 124 of file ELlog4cplus.h.

Referenced by includeSerial(), log(), and suppressSerial().

bool edm::ELlog4cplus::wantSomeContext
protected

Definition at line 124 of file ELlog4cplus.h.

Referenced by includeContext(), log(), and suppressContext().

bool edm::ELlog4cplus::wantSubroutine
protected

Definition at line 124 of file ELlog4cplus.h.

Referenced by includeSubroutine(), log(), and suppressSubroutine().

bool edm::ELlog4cplus::wantText
protected

Definition at line 124 of file ELlog4cplus.h.

Referenced by includeText(), log(), and suppressText().

bool edm::ELlog4cplus::wantTimeSeparate
protected

Definition at line 124 of file ELlog4cplus.h.

Referenced by attachTime(), log(), and separateTime().

bool edm::ELlog4cplus::wantTimestamp
protected

Definition at line 124 of file ELlog4cplus.h.

Referenced by includeTime(), log(), and suppressTime().

ELextendedID edm::ELlog4cplus::xid
protected

Definition at line 121 of file ELlog4cplus.h.

Referenced by log().

int edm::ELlog4cplus::xxxxInt
protected

Definition at line 135 of file ELlog4cplus.h.

Referenced by xxxxSet(), and xxxxShout().