From 180128ff12ff9ba268457cbe74f968fc81ae5a4e Mon Sep 17 00:00:00 2001 From: ppisa Date: Fri, 28 Jul 2006 07:51:11 +0000 Subject: [PATCH 1/1] DBUFF loging updated to match other projects. --- ulut/ul_dbufflog.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/ulut/ul_dbufflog.c b/ulut/ul_dbufflog.c index 3e67634..848ae7d 100644 --- a/ulut/ul_dbufflog.c +++ b/ulut/ul_dbufflog.c @@ -1,28 +1,25 @@ -#include -#include - -#include "ul_log.h" #include "ul_dbufflog.h" +#include "ul_log.h" -UL_LOG_CUST(ulogd_dbuff_log_hex) +ul_log_domain_t ulogd_dbuff; void ul_dbuff_log_hex(ul_dbuff_t *buf, int log_level) { + ul_log(&ulogd_dbuff, log_level, "len=%li capacity=%li\n", buf->len, buf->capacity); int i; - ul_loginf("len=%li capacity=%li\n", buf->len, buf->capacity); log_level |= UL_LOGL_CONT; for(i=0; ilen; i++) { char c = buf->data[i]; - if(i > 0) ul_loginf(" "); - if(c > ' ') ul_loginf(" %c", c); - else ul_loginf("%02x", c); + if(i > 0) ul_log(&ulogd_dbuff, log_level, " "); + if(c > ' ') ul_log(&ulogd_dbuff, log_level, " %c", c); + else ul_log(&ulogd_dbuff, log_level, "%02x", c); } - ul_loginf("\n"); + ul_log(&ulogd_dbuff, log_level, "\n"); for(i=0; ilen; i++) { char c = buf->data[i]; - if(i > 0) ul_loginf(" "); - ul_loginf("%02x", c); + if(i > 0) ul_log(&ulogd_dbuff, log_level, " "); + ul_log(&ulogd_dbuff, log_level, "%02x", c); } - ul_loginf("\n"); + ul_log(&ulogd_dbuff, log_level, "\n"); } -- 2.39.2