-
Notifications
You must be signed in to change notification settings - Fork 375
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
These are internal only for now to allow us gain soem more confidence on the design. rpmlogOnce allows showing a log message only once. rpmlogReset allows purging the list of known message keys for a given domain. This allows for different live times e.g. per transaction or per package. Use in handleHdrVS. This does not add a new test case but various existing test cases fail when the NOKEY message is omited or shown more than once. The code uses the pointer to the rpmts object as a domain and resets it when the rpmts is freed. Resolves: #3336 Resolves: #3395
- Loading branch information
Showing
4 changed files
with
68 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#ifndef H_RPMLOG_INTERNAL | ||
#define H_RPMLOG_INTERNAL 1 | ||
|
||
|
||
/** \ingroup rpmlog | ||
* Generate a log message using FMT string and option arguments. | ||
* Only actually log on the first time passing the key value | ||
* @param domain group of messages to be reset together | ||
* @param key key to match log messages together | ||
* @param code rpmlogLvl | ||
* @param fmt format string and parameter to render | ||
* @return 1 if actually logging 0 otherwise | ||
*/ | ||
int rpmlogOnce (uint64_t domain, const char * key, int code, const char *fmt, ...) RPM_GNUC_PRINTF(4, 5); | ||
|
||
/** \ingroup rpmlog | ||
* Clear memory of logmessages for a given domain | ||
* @param domain group of messages to be reset together | ||
* @param mode curretnly only 0 supported whihc drops everything | ||
*/ | ||
void rpmlogReset(uint64_t domain, int mode=0); | ||
|
||
#endif |