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.
Public Member Functions
|log_ostream (::server *s) throw (Exception)|
|lighttpd::IO::log_ostream< CharT, TraitsT >::log_ostream||(||::server *||s||)|| throw (Exception)
|virtual lighttpd::IO::log_ostream< CharT, TraitsT >::~log_ostream||(||)||