zypp::base::logger::LogControlImpl Struct Reference

LogControl implementation (Singleton). More...

List of all members.

Public Member Functions

void excessive (bool onOff_r)
void setLineWriter (const shared_ptr< LogControl::LineWriter > &writer_r)
 NULL _lineWriter indicates no loggin.
shared_ptr< LogControl::LineWritergetLineWriter () const
void setLineFormater (const shared_ptr< LogControl::LineFormater > &format_r)
 Assert _lineFormater is not NULL.
void logfile (const Pathname &logfile_r, mode_t mode_r=0640)
std::ostream & getStream (const std::string &group_r, LogLevel level_r, const char *file_r, const char *func_r, const int line_r)
 Provide the log stream to write (logger interface).
void putStream (const std::string &group_r, LogLevel level_r, const char *file_r, const char *func_r, int line_r, const std::string &message_r)
 Format and write out a logline from Loglinebuf.

Static Public Attributes

static LogControlImpl instance
 The LogControlImpl singleton.

Private Types

typedef shared_ptr< LoglinestreamStreamPtr
typedef std::map< LogLevel,
StreamPtr
StreamSet
typedef std::map< std::string,
StreamSet
StreamTable

Private Member Functions

 LogControlImpl ()
 Singleton ctor.

Private Attributes

std::ostream _no_stream
bool _excessive
shared_ptr< LogControl::LineFormater_lineFormater
shared_ptr< LogControl::LineWriter_lineWriter
StreamTable _streamtable
 one streambuffer per group and level


Detailed Description

LogControl implementation (Singleton).

Note:
There is a slight difference in using the _lineFormater and _lineWriter!

Definition at line 213 of file LogControl.cc.


Member Typedef Documentation

typedef shared_ptr<Loglinestream> zypp::base::logger::LogControlImpl::StreamPtr [private]
 

Definition at line 287 of file LogControl.cc.

typedef std::map<LogLevel,StreamPtr> zypp::base::logger::LogControlImpl::StreamSet [private]
 

Definition at line 288 of file LogControl.cc.

typedef std::map<std::string,StreamSet> zypp::base::logger::LogControlImpl::StreamTable [private]
 

Definition at line 289 of file LogControl.cc.


Constructor & Destructor Documentation

zypp::base::logger::LogControlImpl::LogControlImpl  )  [inline, private]
 

Singleton ctor.

No logging per default, unless enabled via $ZYPP_LOGFILE.

Definition at line 297 of file LogControl.cc.


Member Function Documentation

void zypp::base::logger::LogControlImpl::excessive bool  onOff_r  )  [inline]
 

Definition at line 216 of file LogControl.cc.

void zypp::base::logger::LogControlImpl::setLineWriter const shared_ptr< LogControl::LineWriter > &  writer_r  )  [inline]
 

NULL _lineWriter indicates no loggin.

Definition at line 220 of file LogControl.cc.

shared_ptr<LogControl::LineWriter> zypp::base::logger::LogControlImpl::getLineWriter  )  const [inline]
 

Definition at line 223 of file LogControl.cc.

void zypp::base::logger::LogControlImpl::setLineFormater const shared_ptr< LogControl::LineFormater > &  format_r  )  [inline]
 

Assert _lineFormater is not NULL.

Definition at line 227 of file LogControl.cc.

void zypp::base::logger::LogControlImpl::logfile const Pathname logfile_r,
mode_t  mode_r = 0640
[inline]
 

Definition at line 235 of file LogControl.cc.

References zypp::filesystem::Pathname::empty().

std::ostream& zypp::base::logger::LogControlImpl::getStream const std::string &  group_r,
LogLevel  level_r,
const char *  file_r,
const char *  func_r,
const int  line_r
[inline]
 

Provide the log stream to write (logger interface).

Definition at line 254 of file LogControl.cc.

References zypp::base::logger::E_XXX.

void zypp::base::logger::LogControlImpl::putStream const std::string &  group_r,
LogLevel  level_r,
const char *  file_r,
const char *  func_r,
int  line_r,
const std::string &  message_r
[inline]
 

Format and write out a logline from Loglinebuf.

Definition at line 273 of file LogControl.cc.


Member Data Documentation

std::ostream zypp::base::logger::LogControlImpl::_no_stream [private]
 

Definition at line 246 of file LogControl.cc.

bool zypp::base::logger::LogControlImpl::_excessive [private]
 

Definition at line 247 of file LogControl.cc.

shared_ptr<LogControl::LineFormater> zypp::base::logger::LogControlImpl::_lineFormater [private]
 

Definition at line 249 of file LogControl.cc.

shared_ptr<LogControl::LineWriter> zypp::base::logger::LogControlImpl::_lineWriter [private]
 

Definition at line 250 of file LogControl.cc.

StreamTable zypp::base::logger::LogControlImpl::_streamtable [private]
 

one streambuffer per group and level

Definition at line 291 of file LogControl.cc.

LogControlImpl zypp::base::logger::LogControlImpl::instance [static]
 

The LogControlImpl singleton.

Note:
As most dtors log, it is inportant that the LogControlImpl instance is the last static variable destructed. At least destucted after all statics which log from their dtor.

Definition at line 313 of file LogControl.cc.


The documentation for this struct was generated from the following file:
Generated on Thu Jul 6 00:07:31 2006 for zypp by  doxygen 1.4.6