libzypp
13.10.6
|
LogControl implementation (Singleton). More...
Public Member Functions | |
bool | isExcessive () |
void | excessive (bool onOff_r) |
void | setLineWriter (const shared_ptr< LogControl::LineWriter > &writer_r) |
NULL _lineWriter indicates no loggin. More... | |
shared_ptr < LogControl::LineWriter > | getLineWriter () const |
void | setLineFormater (const shared_ptr< LogControl::LineFormater > &format_r) |
Assert _lineFormater is not NULL. More... | |
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) More... | |
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. More... | |
Static Public Member Functions | |
static LogControlImpl & | instance () |
The LogControlImpl singleton. More... | |
Private Types | |
typedef shared_ptr< Loglinestream > | StreamPtr |
typedef std::map< LogLevel, StreamPtr > | StreamSet |
typedef std::map< std::string, StreamSet > | StreamTable |
Private Member Functions | |
LogControlImpl () | |
Singleton ctor. More... | |
~LogControlImpl () | |
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 More... | |
Related Functions | |
(Note that these are not member functions.) | |
std::ostream & | operator<< (std::ostream &str, const LogControlImpl &obj) |
LogControl implementation (Singleton).
_lineFormater
must not be NULL (create default LogControl::LineFormater) _lineWriter
is NULL if no logging is performed, this way we can pass _no_stream as logstream to the application, and avoid unnecessary formating of logliles, which would then be discarded when passed to some dummy LineWriter. Definition at line 226 of file LogControl.cc.
|
private |
Definition at line 303 of file LogControl.cc.
|
private |
Definition at line 304 of file LogControl.cc.
|
private |
Definition at line 305 of file LogControl.cc.
|
inlineprivate |
Singleton ctor.
No logging per default, unless enabled via $ZYPP_LOGFILE.
Definition at line 313 of file LogControl.cc.
|
inlineprivate |
Definition at line 328 of file LogControl.cc.
|
inline |
Definition at line 229 of file LogControl.cc.
|
inline |
Definition at line 232 of file LogControl.cc.
|
inline |
NULL _lineWriter indicates no loggin.
Definition at line 236 of file LogControl.cc.
|
inline |
Definition at line 239 of file LogControl.cc.
|
inline |
Assert _lineFormater is not NULL.
Definition at line 243 of file LogControl.cc.
|
inline |
Definition at line 251 of file LogControl.cc.
|
inline |
Provide the log stream to write (logger interface)
Definition at line 270 of file LogControl.cc.
|
inline |
Format and write out a logline from Loglinebuf.
Definition at line 289 of file LogControl.cc.
|
inlinestatic |
The LogControlImpl singleton.
Definition at line 345 of file LogControl.cc.
|
related |
Stream output
Definition at line 354 of file LogControl.cc.
|
private |
Definition at line 262 of file LogControl.cc.
|
private |
Definition at line 263 of file LogControl.cc.
|
private |
Definition at line 265 of file LogControl.cc.
|
private |
Definition at line 266 of file LogControl.cc.
|
private |
one streambuffer per group and level
Definition at line 307 of file LogControl.cc.