OstreamAppender.cpp
Go to the documentation of this file.
1 /*
2  * OstreamAppender.cpp
3  *
4  * Copyright 2000, LifeLine Networks BV (www.lifeline.nl). All rights reserved.
5  * Copyright 2000, Bastiaan Bakker. All rights reserved.
6  *
7  * See the COPYING file for the terms of usage and distribution.
8  */
9 
10 #include "PortabilityImpl.hh"
11 #ifdef LOG4CPP_HAVE_UNISTD_H
12 # include <unistd.h>
13 #endif
14 #include <sys/types.h>
15 #include <sys/stat.h>
16 #include <fcntl.h>
18 
19 namespace log4cpp {
20 
21  OstreamAppender::OstreamAppender(const std::string& name, std::ostream* stream) :
22  LayoutAppender(name),
23  _stream(stream) {
24  }
25 
27  close();
28  }
29 
31  // empty
32  }
33 
35  (*_stream) << _getLayout().format(event);
36  if (!_stream->good()) {
37  // XXX help! help!
38  }
39  }
40 
42  return true;
43  }
44 }
OstreamAppender(const std::string &name, std::ostream *stream)
virtual void _append(const LoggingEvent &event)
virtual std::string format(const LoggingEvent &event)=0


log4cpp
Author(s): Stephen Roderick, Bastiaan Bakker, Cedric Le Goater, Steve Ostlind, Marcel Harkema, Walter Stroebel, Glenn Scott and Tony Cheung
autogenerated on Sun Jun 23 2019 19:10:00