log4cpp::CategoryStream(3) | log4cpp | log4cpp::CategoryStream(3) |
NAME¶
log4cpp::CategoryStream -
This class enables streaming simple types and objects to a category.
SYNOPSIS¶
#include <CategoryStream.hh>
Public Types¶
typedef CategoryStream &(* cspf
)(CategoryStream &)
Public Member Functions¶
CategoryStream (Category &category,
Priority::Value priority)
Construct a CategoryStream for given Category
with given priority. ~CategoryStream ()
Destructor for CategoryStream. Category
& getCategory () const
Returns the destination Category for this stream.
Priority::Value getPriority () const throw ()
Returns the priority for this stream. void flush ()
Flush the contents of the stream buffer to the Category and
empties the buffer. template<typename T >
CategoryStream & operator<< (const T &t)
Stream in arbitrary types and objects. template<typename T >
CategoryStream & operator<< (const std::string
&t)
std::streamsize width (std::streamsize wide)
Set the width output on CategoryStream.
CategoryStream & operator<<
(cspf)
Friends¶
LOG4CPP_EXPORT friend CategoryStream & eol
(CategoryStream &os)
LOG4CPP_EXPORT friend CategoryStream & left
(CategoryStream &os)
Detailed Description¶
This class enables streaming simple types and objects to a category.
Use category.errorStream(), etc. to obtain a CategoryStream class.
Member Typedef Documentation¶
typedef CategoryStream&(* log4cpp::CategoryStream::cspf)(CategoryStream &)¶
Constructor & Destructor Documentation¶
log4cpp::CategoryStream::CategoryStream (Category & category, Priority::Value priority)¶
Construct a CategoryStream for given Category with given priority. Parameters:
priority The priority the log messages will get or Priority::NOTSET to silently discard any streamed in messages.
log4cpp::CategoryStream::~CategoryStream ()¶
Destructor for CategoryStream.
Member Function Documentation¶
void log4cpp::CategoryStream::flush ()¶
Flush the contents of the stream buffer to the Category and empties the buffer.
Category& log4cpp::CategoryStream::getCategory () const [inline]¶
Returns the destination Category for this stream. Returns:
Priority::Value log4cpp::CategoryStream::getPriority () const throw () [inline]¶
Returns the priority for this stream. Returns:
CategoryStream & log4cpp::CategoryStream::operator<< (cspf pf)¶
template<typename T > CategoryStream& log4cpp::CategoryStream::operator<< (const std::string & t) [inline]¶
template<typename T > CategoryStream& log4cpp::CategoryStream::operator<< (const T & t) [inline]¶
Stream in arbitrary types and objects. Parameters:
Returns:
std::streamsize log4cpp::CategoryStream::width (std::streamsize wide)¶
Set the width output on CategoryStream.
Friends And Related Function Documentation¶
LOG4CPP_EXPORT friend CategoryStream& eol (CategoryStream & os) [friend]¶
LOG4CPP_EXPORT friend CategoryStream& left (CategoryStream & os) [friend]¶
Member Data Documentation¶
std::ostringstream* log4cpp::CategoryStream::_buffer¶
Author¶
Generated automatically by Doxygen for log4cpp from the source code.
4 Aug 2014 | Version 1.0 |