No DPRINTF output is logged because the default loglevel is to low in
libxc. Recognize the XENPAGING_DEBUG environment variable to change the
default loglevel at runtime.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
#include "policy.h"
#include "xenpaging.h"
-
-#if 0
-#undef DPRINTF
-#define DPRINTF(...) ((void)0)
-#endif
-
static char filename[80];
static int interrupted;
static void close_handler(int sig)
{
xenpaging_t *paging;
xc_interface *xch;
+ xentoollog_logger *dbg = NULL;
int rc;
- xch = xc_interface_open(NULL, NULL, 0);
+ if ( getenv("XENPAGING_DEBUG") )
+ dbg = (xentoollog_logger *)xtl_createlogger_stdiostream(stderr, XTL_DEBUG, 0);
+ xch = xc_interface_open(dbg, NULL, 0);
if ( !xch )
goto err_iface;