#include <CommitLog.h>
Public Member Functions | |
| CommitLog () | |
| ~CommitLog () | |
| std::ostream & | operator() (bool timestamp=false) |
Static Public Member Functions | |
| static void | setFname (const Pathname &fname_r) |
Private Member Functions | |
| CommitLog (const CommitLog &) | |
| CommitLog & | operator= (const CommitLog &) |
Static Private Member Functions | |
| static void | openLog () |
| static void | closeLog () |
| static void | refUp () |
| static void | refDown () |
Static Private Attributes | |
| static std::ofstream | _log |
| static unsigned | _refcnt = 0 |
| static Pathname | _fname |
Refcnt, filename and corresponding ofstream are static members. Logfile constructor raises, destructor lowers refcounter. On refcounter changing from 0->1, file is opened. Changing from 1->0 the file is closed. Thus Logfile objects should be local to those functions, writing the log, and must not be stored permanently;
Usage: some methothd () { CommitLog progresslog; ... progresslog() << "some message" << endl; ... }
Definition at line 42 of file CommitLog.h.
|
|
|
|
|
Definition at line 55 of file CommitLog.h. References refUp(). |
|
|
Definition at line 56 of file CommitLog.h. References refDown(). |
|
|
|
|
|
Definition at line 33 of file CommitLog.cc. References _fname, _log, zypp::filesystem::Pathname::asString(), zypp::filesystem::Pathname::empty(), and ERR. Referenced by refUp(), and setFname(). |
|
|
Definition at line 41 of file CommitLog.cc. References _log. Referenced by refDown(), and setFname(). |
|
|
Definition at line 45 of file CommitLog.cc. References _refcnt, and openLog(). Referenced by CommitLog(). |
|
|
Definition at line 50 of file CommitLog.cc. References _refcnt, and closeLog(). Referenced by ~CommitLog(). |
|
|
Definition at line 56 of file CommitLog.cc. References _log, and zypp::Date::now(). |
|
|
Definition at line 63 of file CommitLog.cc. References _fname, _refcnt, closeLog(), MIL, and openLog(). Referenced by zypp::target::TargetImpl::setInstallationLogfile(). |
|
|
Definition at line 46 of file CommitLog.h. Referenced by closeLog(), openLog(), and operator()(). |
|
|
Definition at line 47 of file CommitLog.h. Referenced by refDown(), refUp(), and setFname(). |
|
|
Definition at line 48 of file CommitLog.h. Referenced by openLog(), and setFname(). |
1.4.6