From: ppisa Date: Fri, 28 Jul 2006 07:51:11 +0000 (+0000) Subject: DBUFF loging updated to match other projects. X-Git-Tag: ul_drv-0.8.0-release~45 X-Git-Url: https://rtime.felk.cvut.cz/gitweb/ulut.git/commitdiff_plain/180128ff12ff9ba268457cbe74f968fc81ae5a4e?hp=af392308a578abdd72440b6984af7e15f05b1329 DBUFF loging updated to match other projects. --- 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"); }