libzypp
17.28.8
|
LogControl implementation (thread_local Singleton). More...
Public Member Functions | |
bool | isExcessive () const |
void | excessive (bool onOff_r) |
bool | hideThreadName () const |
Hint for Formater whether to hide the thread name. More... | |
void | hideThreadName (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... | |
~LogControlImpl () | |
Static Public Member Functions | |
static bool | instanceHideThreadName () |
static void | instanceHideThreadName (bool onOff_r) |
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 | |
void | readEnvVars () |
LogControlImpl () | |
Singleton ctor. More... | |
Private Attributes | |
LogClient | _logClient |
std::ostream | _no_stream |
bool | _excessive |
TriBool | _hideThreadName = indeterminate |
Hint for Formater whether to hide the thread name. More... | |
shared_ptr< LogControl::LineFormater > | _lineFormater |
StreamTable | _streamtable |
one streambuffer per group and level More... | |
zyppng::Socket::Ptr | _sock |
Related Functions | |
(Note that these are not member functions.) | |
std::ostream & | operator<< (std::ostream &str, const LogControlImpl &) |
LogControl implementation (thread_local 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 538 of file LogControl.cc.
|
private |
Definition at line 646 of file LogControl.cc.
|
private |
Definition at line 647 of file LogControl.cc.
|
private |
Definition at line 648 of file LogControl.cc.
|
inlineprivate |
Singleton ctor.
No logging per default, unless enabled via $ZYPP_LOGFILE.
Definition at line 668 of file LogControl.cc.
|
inline |
Definition at line 682 of file LogControl.cc.
|
inline |
Definition at line 541 of file LogControl.cc.
|
inline |
Definition at line 544 of file LogControl.cc.
|
inline |
Hint for Formater whether to hide the thread name.
Definition at line 549 of file LogControl.cc.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 556 of file LogControl.cc.
|
inlinestatic |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 559 of file LogControl.cc.
|
inlinestatic |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 565 of file LogControl.cc.
|
inline |
NULL _lineWriter indicates no loggin.
Definition at line 573 of file LogControl.cc.
|
inline |
Definition at line 576 of file LogControl.cc.
|
inline |
Assert _lineFormater is not NULL.
Definition at line 580 of file LogControl.cc.
|
inline |
Definition at line 588 of file LogControl.cc.
|
inline |
Provide the log stream to write (logger interface)
Definition at line 608 of file LogControl.cc.
|
inline |
Format and write out a logline from Loglinebuf.
Definition at line 633 of file LogControl.cc.
|
inlineprivate |
Definition at line 655 of file LogControl.cc.
|
inlinestatic |
The LogControlImpl singleton.
Definition at line 698 of file LogControl.cc.
|
related |
Stream output
Definition at line 709 of file LogControl.cc.
|
private |
Definition at line 599 of file LogControl.cc.
|
private |
Definition at line 600 of file LogControl.cc.
|
private |
Definition at line 601 of file LogControl.cc.
|
mutableprivate |
Hint for Formater whether to hide the thread name.
Definition at line 602 of file LogControl.cc.
|
private |
Definition at line 604 of file LogControl.cc.
|
private |
one streambuffer per group and level
Definition at line 650 of file LogControl.cc.
|
private |
Definition at line 651 of file LogControl.cc.