#include <LogControl.h>
Public Member Functions | |
| void | setLineFormater (const shared_ptr< LineFormater > &formater_r) |
| Assign a LineFormater. | |
| void | logfile (const Pathname &logfile_r) |
| Set path for the logfile. | |
| void | logfile (const Pathname &logfile_r, mode_t mode_r) |
| void | logNothing () |
| Turn off logging. | |
| void | logToStdErr () |
| Log to std::err. | |
| void | setLineWriter (const shared_ptr< LineWriter > &writer_r) |
| Assign a LineWriter. | |
Static Public Member Functions | |
| static LogControl | instance () |
| Singleton access. | |
Private Member Functions | |
| LogControl () | |
| Default ctor: Singleton. | |
Friends | |
| std::ostream & | operator<< (std::ostream &str, const LogControl &obj) |
| Stream output. | |
Classes | |
| struct | LineFormater |
If you want to format loglines by yourself, derive from this, and overload format. More... | |
| struct | LineWriter |
If you want to log the (formated) loglines by yourself, derive from this, and overload writeOut. More... | |
| struct | TmpExcessive |
| Turn on excessive logging for the lifetime of this object. More... | |
| struct | TmpLineWriter |
| Exchange LineWriter for the lifetime of this object. More... | |
Definition at line 36 of file LogControl.h.
| zypp::base::LogControl::LogControl | ( | ) | [inline, private] |
| static LogControl zypp::base::LogControl::instance | ( | ) | [inline, static] |
Singleton access.
Definition at line 42 of file LogControl.h.
References LogControl().
Referenced by zypp::solver::detail::Testcase::createTestcase().
| void zypp::base::LogControl::setLineFormater | ( | const shared_ptr< LineFormater > & | formater_r | ) |
Assign a LineFormater.
If you want to format loglines by yourself. NULL installs the default formater.
Definition at line 386 of file LogControl.cc.
| void zypp::base::LogControl::logfile | ( | const Pathname & | logfile_r | ) |
Set path for the logfile.
Permission for logfiles is set to 0640 unless an explicit mode_t value is given. An empty pathname turns off logging. "-" logs to std::err.
| if | logfile_r is not usable. |
Definition at line 377 of file LogControl.cc.
| void zypp::base::LogControl::logfile | ( | const Pathname & | logfile_r, | |
| mode_t | mode_r | |||
| ) |
Definition at line 380 of file LogControl.cc.
| void zypp::base::LogControl::logNothing | ( | ) |
| void zypp::base::LogControl::logToStdErr | ( | ) |
| void zypp::base::LogControl::setLineWriter | ( | const shared_ptr< LineWriter > & | writer_r | ) |
Assign a LineWriter.
If you want to log the (formated) loglines by yourself. NULL turns off logging (same as logNothing)
Definition at line 383 of file LogControl.cc.
| std::ostream & operator<< | ( | std::ostream & | str, | |
| const LogControl & | obj | |||
| ) | [friend] |
1.5.3