LibPkg
|
Class to log actions that occur in LibPkg. More...
#include <log.h>
Public Types | |
typedef std::vector< log_entry >::const_iterator | const_iterator |
Iterator type for the log entries. More... | |
Public Member Functions | |
log () | |
Construct an empty log. More... | |
bool | bad () const |
The log failed to add one or more items. More... | |
void | message (LogCode code, const char *param1=0, const char *param2=0) |
Add a new entry to the log. More... | |
void | message (LogCode code, const std::string ¶m) |
Add a new entry to the log from a standard string. More... | |
void | message (LogCode code, const std::string ¶m1, const std::string ¶m2) |
Add a new entry to the log from two standard strings. More... | |
const_iterator | begin () const |
Iterator to first log entry. More... | |
const_iterator | end () const |
Iterator to last log entry. More... | |
unsigned int | size () const |
Total number of entries. More... | |
unsigned int | errors () const |
Number of errors. More... | |
unsigned int | warnings () const |
Number of warnings. More... | |
const log_entry & | operator[] (int index) const |
Return entry for a given index. More... | |
const log_entry & | entry (int index) const |
Return entry for a given index. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &stream, const log &olog) |
Output log as text. More... | |
Class to log actions that occur in LibPkg.
typedef std::vector<log_entry>::const_iterator pkg::log::const_iterator |
Iterator type for the log entries.
pkg::log::log | ( | ) |
Construct an empty log.
|
inline |
The log failed to add one or more items.
References pkg::log_entry::code().
void pkg::log::message | ( | LogCode | code, |
const char * | param1 = 0 , |
||
const char * | param2 = 0 |
||
) |
Add a new entry to the log.
code | Entry log code |
param1 | first parameter or 0 (the default) for none |
param2 | second parameter or 0 (the default) for none |
Referenced by pkg::triggers::copy_post_remove_file(), pkg::triggers::delete_shared_vars(), pkg::commit::log_to(), pkg::update::poll(), pkg::commit::poll(), pkg::unpack::poll(), pkg::trigger::run(), and pkg::trigger::trigger_log().
|
inline |
|
inline |
|
inline |
Iterator to first log entry.
|
inline |
Iterator to last log entry.
|
inline |
Total number of entries.
|
inline |
Number of errors.
|
inline |
Number of warnings.
|
inline |
Return entry for a given index.
|
inline |
Return entry for a given index.
References pkg::operator<<().
|
friend |
Output log as text.
Reference Manual | LibPkg | Version 0.6.1 (28 Jan 2015) |