|
libzypp 17.38.14
|
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. | |
| void | hideThreadName (bool onOff_r) |
| void | setLineWriter (const shared_ptr< LogControl::LineWriter > &writer_r) |
| NULL _lineWriter indicates no loggin. | |
| shared_ptr< LogControl::LineWriter > | getLineWriter () 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 | putRawLine (std::string &&line) |
| 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. | |
| LogControlImpl (const LogControlImpl &)=delete | |
| LogControlImpl (LogControlImpl &&)=delete | |
| LogControlImpl & | operator= (const LogControlImpl &)=delete |
| LogControlImpl & | operator= (LogControlImpl &&)=delete |
| ~LogControlImpl () | |
Static Public Member Functions | |
| static bool | instanceHideThreadName () |
| static void | instanceHideThreadName (bool onOff_r) |
| static bool | instanceLogToPPID () |
| Hint for formatter wether we forward all logs to a parents log. | |
| static void | instanceSetLogToPPID (bool onOff_r) |
| static LogControlImpl * | instance () |
| The LogControlImpl singleton. | |
Private Types | |
| using | StreamPtr = shared_ptr<Loglinestream> |
| using | StreamSet = std::map<LogLevel, StreamPtr> |
| using | StreamTable = std::map<std::string, StreamSet> |
Private Member Functions | |
| void | readEnvVars () |
| LogControlImpl () | |
| Singleton ctor. | |
Private Attributes | |
| LogClient | _logClient |
| std::ostream | _no_stream |
| bool | _excessive |
| bool | _logToPPIDMode = false |
| Hint for formatter to use the PPID and always show the thread name. | |
| TriBool | _hideThreadName = indeterminate |
| Hint for Formater whether to hide the thread name. | |
| shared_ptr< LogControl::LineFormater > | _lineFormater |
| StreamTable | _streamtable |
| one streambuffer per group and level | |
| zyppng::Socket::Ptr | _sock |
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 581 of file LogControl.cc.
|
private |
Definition at line 708 of file LogControl.cc.
|
private |
Definition at line 709 of file LogControl.cc.
|
private |
Definition at line 710 of file LogControl.cc.
|
inlineprivate |
Singleton ctor.
No logging per default, unless enabled via $ZYPP_LOGFILE.
Definition at line 730 of file LogControl.cc.
|
delete |
|
delete |
Definition at line 749 of file LogControl.cc.
|
inline |
Definition at line 584 of file LogControl.cc.
|
inline |
Definition at line 586 of file LogControl.cc.
|
inline |
Hint for Formater whether to hide the thread name.
Definition at line 591 of file LogControl.cc.
|
inline |
Definition at line 598 of file LogControl.cc.
|
inlinestatic |
Definition at line 602 of file LogControl.cc.
|
inlinestatic |
Definition at line 608 of file LogControl.cc.
|
inlinestatic |
Hint for formatter wether we forward all logs to a parents log.
Definition at line 615 of file LogControl.cc.
|
inlinestatic |
Definition at line 622 of file LogControl.cc.
|
inline |
NULL _lineWriter indicates no loggin.
Definition at line 630 of file LogControl.cc.
|
inline |
Definition at line 633 of file LogControl.cc.
|
inline |
Assert _lineFormater is not NULL.
Definition at line 637 of file LogControl.cc.
|
inline |
Definition at line 645 of file LogControl.cc.
|
inline |
Provide the log stream to write (logger interface).
Definition at line 666 of file LogControl.cc.
|
inline |
Definition at line 690 of file LogControl.cc.
|
inline |
Format and write out a logline from Loglinebuf.
Definition at line 695 of file LogControl.cc.
|
inlineprivate |
Definition at line 717 of file LogControl.cc.
|
delete |
|
delete |
|
inlinestatic |
The LogControlImpl singleton.
Definition at line 765 of file LogControl.cc.
Definition at line 656 of file LogControl.cc.
|
private |
Definition at line 657 of file LogControl.cc.
Definition at line 658 of file LogControl.cc.
|
private |
Hint for formatter to use the PPID and always show the thread name.
Definition at line 659 of file LogControl.cc.
|
mutableprivate |
Hint for Formater whether to hide the thread name.
Definition at line 660 of file LogControl.cc.
Definition at line 662 of file LogControl.cc.
one streambuffer per group and level
Definition at line 712 of file LogControl.cc.
Definition at line 713 of file LogControl.cc.