libzypp 17.31.23
|
Writing the zypp history file. More...
#include <HistoryLog.h>
Public Member Functions | |
HistoryLog (const Pathname &rootdir=Pathname()) | |
Constructor with an optional root directory. | |
~HistoryLog () | |
void | comment (const std::string &comment, bool timestamp=false) |
Log a comment (even multiline). | |
void | stampCommand () |
Log info about the current process. | |
void | install (const PoolItem &pi) |
Log installation (or update) of a package. | |
void | remove (const PoolItem &pi) |
Log removal of a package. | |
void | addRepository (const RepoInfo &repo) |
Log a newly added repository. | |
void | removeRepository (const RepoInfo &repo) |
Log recently removed repository. | |
void | modifyRepository (const RepoInfo &oldrepo, const RepoInfo &newrepo) |
Log certain modifications to a repository. | |
void | patchStateChange (const PoolItem &pi, ResStatus::ValidateValue oldstate) |
Log state changes in patches. | |
Static Public Member Functions | |
static void | setRoot (const Pathname &root) |
Set new root directory to the default history log file path. | |
static const Pathname & | fname () |
Get the current log file path. | |
Private Member Functions | |
HistoryLog (const HistoryLog &) | |
HistoryLog & | operator= (const HistoryLog &) |
Writing the zypp history file.
Reference counted signleton for writhing the zypp history file. The history file is opened on demand and closed when the last HistoryLog object drops its reference. Thus HistoryLog objects should be local to those functions, writing the log, and must not be stored permanently.
/var/log/zypp/history
).Definition at line 56 of file HistoryLog.h.
|
private |
Constructor with an optional root directory.
rootdir | actual target root directory |
Definition at line 152 of file HistoryLog.cc.
zypp::HistoryLog::~HistoryLog | ( | ) |
Definition at line 158 of file HistoryLog.cc.
|
private |
|
static |
Set new root directory to the default history log file path.
This path will be prepended to the default log file path. This should be done where there is a potential that the target root has changed.
root | new root directory. |
Definition at line 163 of file HistoryLog.cc.
|
static |
Get the current log file path.
Definition at line 181 of file HistoryLog.cc.
void zypp::HistoryLog::comment | ( | const std::string & | comment, |
bool | timestamp = false |
||
) |
Log a comment (even multiline).
comment | the comment |
timestamp | whether to include a timestamp at the start of the comment |
Definition at line 190 of file HistoryLog.cc.
void zypp::HistoryLog::stampCommand | ( | ) |
void zypp::HistoryLog::install | ( | const PoolItem & | pi | ) |
Log installation (or update) of a package.
Definition at line 234 of file HistoryLog.cc.
void zypp::HistoryLog::remove | ( | const PoolItem & | pi | ) |
Log removal of a package.
Definition at line 262 of file HistoryLog.cc.
void zypp::HistoryLog::addRepository | ( | const RepoInfo & | repo | ) |
Log a newly added repository.
repo | info about the added repository |
Definition at line 289 of file HistoryLog.cc.
void zypp::HistoryLog::removeRepository | ( | const RepoInfo & | repo | ) |
Log recently removed repository.
repo | info about the removed repository |
Definition at line 301 of file HistoryLog.cc.
Log certain modifications to a repository.
oldrepo | info about the old repository |
newrepo | info about the new repository |
Definition at line 312 of file HistoryLog.cc.
void zypp::HistoryLog::patchStateChange | ( | const PoolItem & | pi, |
ResStatus::ValidateValue | oldstate | ||
) |
Log state changes in patches.
oldstate | info about the old state |
Definition at line 337 of file HistoryLog.cc.