-
Notifications
You must be signed in to change notification settings - Fork 367
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. Resolves: #3395
- Loading branch information
Showing
2 changed files
with
60 additions
and
1 deletion.
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
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 |