lighttpd::IO::log_ostream< CharT, TraitsT > Class Template Reference

#include <src/ligh++pd/io/log.h>

Detailed Description

template<class CharT, class TraitsT = std::char_traits<CharT>>
class lighttpd::IO::log_ostream< CharT, TraitsT >

A std::basic_ostream subclass which creates its own std::basic_streambf instance to communicate with lighties logging system.

On construction the object creates a niftyLib::IO::device_streambuf which is coupled with a set of niftyLib::IO::filter and finally with a fitting niftyLib::IO::device subclass we need to pump characters to the apropriate sink.


    If we're supposed to write log lines into stderr we build up a device/filter chain of:

    	   niftyLib::IO::str_log_filter<char> -> niftyLib::IO::time_log_filter -> niftyLib::IO::fd_device( STDERR_FILENO )

    This way every line is preceeded by (a) the current time stamp as provided by the niftyLib::IO::time_log_filter (b) an optional log_intro string associated with the niftyLib::IO::str_log_filter. This my easily be manipulated with theniftyLib::IO::log_intro stream manipulator. (3) It finally ends of in the current stderr.


    If the logging sink is a logfile we replace the final destination niftyLib::IO::device with our lighttpd::IO::elog_log_device. The rest of the filter chain stays the same. The lighttpd::IO::elog_log_device identifies the curent log file from the Server object and takes apropriate action to feed the final loging sink.


    If lighty is meant to use the syslog facility to do its logging we may omit the niftyLib::IO::time_log_filter part of the filter chain. The final sink is a niftyLib::IO::syslog_device.

See also:

Public Member Functions

 log_ostream (::server *s) throw (Exception)
virtual ~log_ostream ()

Constructor & Destructor Documentation

template<class CharT, class TraitsT = std::char_traits<CharT>>
lighttpd::IO::log_ostream< CharT, TraitsT >::log_ostream ( ::server s  )  throw (Exception) [inline]

template<class CharT, class TraitsT = std::char_traits<CharT>>
virtual lighttpd::IO::log_ostream< CharT, TraitsT >::~log_ostream (  )  [inline, virtual]

The documentation for this class was generated from the following file:

Generated by  doxygen
© 2008; Dr. Sebastian Kloska ( Oncaphillis )
Powered by: [?]