diff options
author | Yorhel <git@yorhel.nl> | 2013-06-04 16:58:25 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2013-06-04 16:58:25 +0200 |
commit | f10ff1adeff3deef51e70d084cc3bc0dfe0b4ecb (patch) | |
tree | c43fde8157e23ccff26dbc8e3b705a913f9dfdb5 | |
parent | 71bad32e61b794eb0331d7640cbe1aa5e11db71c (diff) |
Update deps for new ylog + Make use of ytrace()
The 'trace' log level is for very verbose debugging information that you
really don't want to have enabled for anything except the specific
sub-component that you happen to be debugging.
m--------- | deps | 0 | ||||
-rw-r--r-- | src/main.c | 1 | ||||
-rw-r--r-- | src/share/scan.c | 4 | ||||
-rw-r--r-- | src/util/netstream.c | 10 |
4 files changed, 8 insertions, 7 deletions
diff --git a/deps b/deps -Subproject c24f71184638b49fa7e25c13e38b0f51415bdd0 +Subproject 7091f3f7e29033dd1210bc9d48d58d3bf5cbb04 @@ -104,6 +104,7 @@ static void log_handler(const char *file, int line, int level, const char *messa case YLOG_WARN: strcpy(lvl, "WARN-"); break; case YLOG_INFO: strcpy(lvl, "info-"); break; case YLOG_DEBUG: strcpy(lvl, "debug"); break; + case YLOG_TRACE: strcpy(lvl, "trace"); break; default: sprintf(lvl, "%5d", level); } } diff --git a/src/share/scan.c b/src/share/scan.c index 5784ff1..ccde853 100644 --- a/src/share/scan.c +++ b/src/share/scan.c @@ -118,7 +118,7 @@ static share_fl_t *share_scan_thread_item(share_scan_work_t *w, const char *fnam buf->l = 0; ksprintf(buf, "%s/%s", w->fspath, fname); - ylog(YLOG_TRACE, "Stat()ing '%s'", buf->s); + ytrace("Stat()ing '%s'", buf->s); /* TODO: Use stat() when FollowSymlinks is enabled. */ if(lstat(buf->s, &st) == -1) { @@ -232,7 +232,7 @@ static void share_scan_thread_merge(share_scan_work_t *w, share_flv_t *lst) { static void share_scan_work(evtp_work_t *_w) { share_scan_work_t *w = (share_scan_work_t *)_w; - ylog(YLOG_TRACE, "Scanning '%s'", w->fspath); + ytrace("Scanning '%s'", w->fspath); share_flv_t lst = share_scan_thread_readdir(w); if(lst.n) qsort(lst.a, lst.n, sizeof(*lst.a), share_fl_sort_cmp); diff --git a/src/util/netstream.c b/src/util/netstream.c index 7c9e0c1..f753308 100644 --- a/src/util/netstream.c +++ b/src/util/netstream.c @@ -183,7 +183,7 @@ static void nets_sync_poll(nets_t *n) { else if(!n->wwant && ev_is_active(&n->wio)) ev_io_stop(EV_DEFAULT_UC_ &n->wio); - ydebug("%p: Polling for %s", n, n->rwant && n->wwant ? "reading & writing" : n->rwant ? "reading" : n->wwant ? "writing" : "nothing"); + ytrace("%p: Polling for %s", n, n->rwant && n->wwant ? "reading & writing" : n->rwant ? "reading" : n->wwant ? "writing" : "nothing"); } @@ -554,7 +554,7 @@ static void nets_read_check(nets_t *n) { if(n->rwant || n->rtp.data) return; - ydebug("%p: Starting read", n); + ytrace("%p: Starting read", n); /* XXX: In contrast to the write I/O stuff, all read queue items are * processed one at a time. @@ -760,7 +760,7 @@ static void nets_write_check(nets_t *n) { n->wcan = false; nets_write_setend(n); - ydebug("%p: Starting write", n); + ytrace("%p: Starting write", n); n->wtp.data = n; /* Short-cut a raw write in the main thread (pretending that it's done in a thread pool) */ if(!n->tls && !n->wz) { @@ -933,7 +933,7 @@ done: static void nets_rio_ready(EV_P_ ev_io *io, int events) { nets_t *n = io->data; - ydebug("%p: Read poll ready", n); + ytrace("%p: Read poll ready", n); n->rcan = true; n->rwant = false; nets_check(n); @@ -942,7 +942,7 @@ static void nets_rio_ready(EV_P_ ev_io *io, int events) { static void nets_wio_ready(EV_P_ ev_io *io, int events) { nets_t *n = io->data; - ydebug("%p: Write poll ready", n); + ytrace("%p: Write poll ready", n); n->wcan = true; n->wwant = false; nets_check(n); |