35#define RPMLOG_PRIMASK 0x07
37#define RPMLOG_PRI(p) ((p) & RPMLOG_PRIMASK)
38#define RPMLOG_MAKEPRI(fac, pri) ((((unsigned)(fac)) << 3) | (pri))
39#define RPMLOG_NPRIS (RPMLOG_DEBUG + 1)
44#define RPMLOG_MASK(pri) (1 << ((unsigned)(pri)))
45#define RPMLOG_UPTO(pri) ((1 << (((unsigned)(pri))+1)) - 1)
53#define RPMLOG_PID 0x01
54#define RPMLOG_CONS 0x02
55#define RPMLOG_ODELAY 0x04
56#define RPMLOG_NDELAY 0x08
57#define RPMLOG_NOWAIT 0x10
58#define RPMLOG_PERROR 0x20
63#define RPMLOG_DEFAULT 0x01
64#define RPMLOG_EXIT 0x02
68typedef struct rpmlogRec_s * rpmlogRec;
86typedef void * rpmlogCallbackData;
140void rpmlogOpen (
const char * ident,
int option,
int facility);
154void rpmlog (
int code,
const char *fmt, ...) RPM_GNUC_PRINTF(2, 3);
198#define rpmSetVerbosity(_lvl) \
199 ((void)rpmlogSetMask( RPMLOG_UPTO( RPMLOG_PRI(_lvl))))
200#define rpmIncreaseVerbosity() \
201 ((void)rpmlogSetMask(((((unsigned)(rpmlogSetMask(0) & 0xff)) << 1) | 1)))
202#define rpmDecreaseVerbosity() \
203 ((void)rpmlogSetMask((((int)(rpmlogSetMask(0) & 0xff)) >> 1)))
204#define rpmIsNormal() \
205 (rpmlogSetMask(0) >= RPMLOG_MASK( RPMLOG_NOTICE ))
206#define rpmIsVerbose() \
207 (rpmlogSetMask(0) >= RPMLOG_MASK( RPMLOG_INFO ))
208#define rpmIsDebug() \
209 (rpmlogSetMask(0) >= RPMLOG_MASK( RPMLOG_DEBUG ))
RPM_PUBLIC_API int rpmlogSetMask(int mask)
RPM_PUBLIC_API int rpmlogGetNrecsByMask(unsigned mask)
RPM_PUBLIC_API void rpmlogOpen(const char *ident, int option, int facility)
RPM_PUBLIC_API FILE * rpmlogSetFile(FILE *fp)
RPM_PUBLIC_API void rpmlogClose(void)
RPM_PUBLIC_API int rpmlogGetNrecs(void)
enum rpmlogLvl_e rpmlogLvl
int(* rpmlogCallback)(rpmlogRec rec, rpmlogCallbackData data)
Definition rpmlog.h:96
RPM_PUBLIC_API rpmlogCallback rpmlogSetCallback(rpmlogCallback cb, rpmlogCallbackData data)
RPM_PUBLIC_API void rpmlogPrint(FILE *f)
RPM_PUBLIC_API rpmlogLvl rpmlogRecPriority(rpmlogRec rec)
RPM_PUBLIC_API const char * rpmlogLevelPrefix(rpmlogLvl pri)
RPM_PUBLIC_API const char * rpmlogRecMessage(rpmlogRec rec)
RPM_PUBLIC_API void RPM_PUBLIC_API const char * rpmlogMessage(void)
RPM_PUBLIC_API void rpmlogPrintByMask(FILE *f, unsigned mask)
rpmlogLvl_e
Definition rpmlog.h:24
RPM_PUBLIC_API int rpmlogCode(void)
RPM_PUBLIC_API void rpmlog(int code, const char *fmt,...) RPM_GNUC_PRINTF(2
@ RPMLOG_DEBUG
Definition rpmlog.h:32
@ RPMLOG_ERR
Definition rpmlog.h:28
@ RPMLOG_WARNING
Definition rpmlog.h:29
@ RPMLOG_NOTICE
Definition rpmlog.h:30
@ RPMLOG_INFO
Definition rpmlog.h:31
@ RPMLOG_CRIT
Definition rpmlog.h:27
@ RPMLOG_EMERG
Definition rpmlog.h:25
@ RPMLOG_ALERT
Definition rpmlog.h:26