Move logging related macros rpmlog, adjust includes

This commit is contained in:
Panu Matilainen 2007-11-30 23:08:38 +02:00
parent 95953fe610
commit 89527785bb
26 changed files with 35 additions and 24 deletions

View File

@ -7,6 +7,7 @@
#include "system.h"
#include <rpmbuild.h>
#include <rpmlog.h>
#include "debug.h"
typedef const char * ugstr_t;

View File

@ -7,6 +7,7 @@
#include <rpmcli.h> /* XXX rpmcliPackagesTotal */
#include <rpmmacro.h> /* XXX rpmExpand("%{_dependency_whiteout}" */
#include <rpmlog.h>
#include <rpmdb.h>
#include "rpmdb/rpmdb_internal.h" /* XXX response cache needs dbiOpen et al. */

View File

@ -5,6 +5,7 @@
#include "system.h"
#include <rpmlib.h>
#include <rpmlog.h>
#include <rpmfileutil.h>
#include <rpmstring.h>

View File

@ -8,6 +8,7 @@ const char *__progname;
#include <rpmcli.h>
#include <rpmgi.h>
#include <rpmlog.h>
#include "debug.h"

View File

@ -5,6 +5,7 @@
#include <rpmlib.h>
#include <rpmstring.h>
#include <rpmlog.h>
#include <rpmds.h>

View File

@ -6,6 +6,7 @@
#include "system.h"
#include <rpmlib.h>
#include <rpmlog.h>
#include "lib/cpio.h" /* XXX CPIO_FOO */
#include "lib/fsm.h" /* XXX newFSM() */

View File

@ -2,6 +2,7 @@
#include "system.h"
#include <rpmlib.h>
#include <rpmlog.h>
#include <rpmmacro.h>
#include <rpmfileutil.h>

View File

@ -6,7 +6,6 @@
#include <rpmte.h>
#include <rpmmacro.h>
#include <rpmmessages.h>
#include "rpmio/fts.h"
#include <popt.h>

View File

@ -6,6 +6,7 @@
#include <rpmlib.h>
#include <rpmmacro.h> /* XXX for rpmExpand */
#include <rpmlog.h>
#include "lib/fsm.h"
#include "lib/psm.h"

View File

@ -1,6 +1,7 @@
#include "system.h"
#include <rpmcli.h>
#include <rpmts.h>
#include <rpmlog.h>
#include "debug.h"

View File

@ -6,6 +6,7 @@
#include <rpmts.h>
#include <rpmsq.h> /* XXX for _rpmsq_debug */
#include <rpmio.h>
#include <rpmlog.h>
#include "debug.h"

View File

@ -6,6 +6,7 @@
#include "system.h"
#include <rpmcli.h>
#include <rpmlog.h>
#include "lib/psm.h"
#include <rpmfi.h>

View File

@ -6,6 +6,7 @@
#include <rpmdb.h>
#include <rpmsq.h>
#include <rpmlog.h>
#include "header-py.h"
#include "rpmal-py.h"

View File

@ -27,6 +27,7 @@
#include "system.h"
#include <rpmlib.h>
#include <rpmlog.h>
#include <rpmmacro.h>
#include <rpmurl.h> /* XXX urlPath proto */
#include <rpmfileutil.h> /* rpmioMkpath */

View File

@ -16,7 +16,6 @@
#include <rpmstring.h>
#include <rpmfileutil.h>
#include <rpmurl.h>
#include <rpmmessages.h>
#include <rpmlog.h>
#ifdef WITH_LUA

View File

@ -226,6 +226,19 @@ rpmlogCallback rpmlogSetCallback(rpmlogCallback cb);
*/
FILE * rpmlogSetFile(FILE * fp);
#define rpmSetVerbosity(_lvl) \
((void)rpmlogSetMask( RPMLOG_UPTO( RPMLOG_PRI(_lvl))))
#define rpmIncreaseVerbosity() \
((void)rpmlogSetMask(((((unsigned)(rpmlogSetMask(0) & 0xff)) << 1) | 1)))
#define rpmDecreaseVerbosity() \
((void)rpmlogSetMask((((int)(rpmlogSetMask(0) & 0xff)) >> 1)))
#define rpmIsNormal() \
(rpmlogSetMask(0) >= RPMLOG_MASK( RPMLOG_NOTICE ))
#define rpmIsVerbose() \
(rpmlogSetMask(0) >= RPMLOG_MASK( RPMLOG_INFO ))
#define rpmIsDebug() \
(rpmlogSetMask(0) >= RPMLOG_MASK( RPMLOG_DEBUG ))
#ifdef __cplusplus
}
#endif

View File

@ -6,25 +6,10 @@
* @todo Eliminate from API.
*/
#include <rpmlog.h>
#ifdef __cplusplus
extern "C" {
#endif
#define rpmSetVerbosity(_lvl) \
((void)rpmlogSetMask( RPMLOG_UPTO( RPMLOG_PRI(_lvl))))
#define rpmIncreaseVerbosity() \
((void)rpmlogSetMask(((((unsigned)(rpmlogSetMask(0) & 0xff)) << 1) | 1)))
#define rpmDecreaseVerbosity() \
((void)rpmlogSetMask((((int)(rpmlogSetMask(0) & 0xff)) >> 1)))
#define rpmIsNormal() \
(rpmlogSetMask(0) >= RPMLOG_MASK( RPMLOG_NOTICE ))
#define rpmIsVerbose() \
(rpmlogSetMask(0) >= RPMLOG_MASK( RPMLOG_INFO ))
#define rpmIsDebug() \
(rpmlogSetMask(0) >= RPMLOG_MASK( RPMLOG_DEBUG ))
/* LCL: ??? */
typedef const void * fnpyKey;

View File

@ -2,7 +2,7 @@
#include "rpmio/rpmio_internal.h"
#include <rpmmacro.h>
#include <rpmmessages.h>
#include <rpmlog.h>
#include <popt.h>
#include "debug.h"

View File

@ -3,7 +3,7 @@
#include "rpmio/rpmio_internal.h"
#include <rpmmacro.h>
#include <rpmmessages.h>
#include <rpmlog.h>
#include <popt.h>
#include "debug.h"

View File

@ -2,7 +2,7 @@
#include "rpmio/rpmio_internal.h"
#include <rpmmacro.h>
#include <rpmmessages.h>
#include <rpmlog.h>
#include <popt.h>
#include "debug.h"

View File

@ -2,7 +2,7 @@
#include "rpmio/rpmio_internal.h"
#include <rpmmacro.h>
#include <rpmmessages.h>
#include <rpmlog.h>
#include <popt.h>
#include "debug.h"

View File

@ -2,7 +2,7 @@
#include "rpmio/rpmio_internal.h"
#include <rpmmacro.h>
#include <rpmmessages.h>
#include <rpmlog.h>
#include <popt.h>
#include "debug.h"

View File

@ -2,7 +2,7 @@
#include "rpmio/rpmio_internal.h"
#include <rpmmacro.h>
#include <rpmmessages.h>
#include <rpmlog.h>
#include <popt.h>
#include "debug.h"

View File

@ -8,7 +8,7 @@
#include <netinet/in.h>
#include <rpmmacro.h>
#include <rpmmessages.h>
#include <rpmlog.h>
#include <rpmurl.h>
#include <rpmio.h>

View File

@ -13,6 +13,7 @@ const char *__progname;
#include <rpmcli.h>
#include <rpmbuild.h>
#include <rpmlog.h>
#include <rpmdb.h>
#include "rpmdb/rpmdb_internal.h" /* XXX for freeing dbiTags */

View File

@ -9,6 +9,7 @@ const char *__progname;
#include "rpmio/fts.h"
#include <rpmcli.h>
#include <rpmlog.h>
#include <rpmps.h>
#include <rpmdb.h>