From 9b85ae106b8ce28679ca10d21c07ee9e95001574 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Tue, 3 Jul 2012 14:32:13 +0100 Subject: limit url debug output to 140 characters --- content/content.c | 10 ++++++---- content/fetchers/data.c | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'content') diff --git a/content/content.c b/content/content.c index f3345db77..f39ba91d4 100644 --- a/content/content.c +++ b/content/content.c @@ -47,6 +47,7 @@ #include "utils/talloc.h" #include "utils/utils.h" +#define URL_FMT_SPC "%.140s" const char * const content_status_name[] = { "LOADING", @@ -82,7 +83,8 @@ nserror content__init(struct content *c, const content_handler *handler, struct content_user *user_sentinel; nserror error; - LOG(("url %s -> %p", nsurl_access(llcache_handle_get_url(llcache)), c)); + LOG(("url "URL_FMT_SPC" -> %p", + nsurl_access(llcache_handle_get_url(llcache)), c)); user_sentinel = talloc(c, struct content_user); if (user_sentinel == NULL) { @@ -274,7 +276,7 @@ void content_convert(struct content *c) if (c->locked == true) return; - LOG(("content %s (%p)", + LOG(("content "URL_FMT_SPC" (%p)", nsurl_access(llcache_handle_get_url(c->llcache)), c)); if (c->handler->data_complete != NULL) { @@ -550,7 +552,7 @@ bool content_add_user(struct content *c, { struct content_user *user; - LOG(("content %s (%p), user %p %p", + LOG(("content "URL_FMT_SPC" (%p), user %p %p", nsurl_access(llcache_handle_get_url(c->llcache)), c, callback, pw)); user = talloc(c, struct content_user); @@ -578,7 +580,7 @@ void content_remove_user(struct content *c, void *pw) { struct content_user *user, *next; - LOG(("content %s (%p), user %p %p", + LOG(("content "URL_FMT_SPC" (%p), user %p %p", nsurl_access(llcache_handle_get_url(c->llcache)), c, callback, pw)); diff --git a/content/fetchers/data.c b/content/fetchers/data.c index 80b48b0e4..383e3c0c5 100644 --- a/content/fetchers/data.c +++ b/content/fetchers/data.c @@ -154,7 +154,7 @@ static bool fetch_data_process(struct fetch_data_context *c) * data must still be there. */ - LOG(("*** Processing %s", c->url)); + LOG(("url: %.140s", c->url)); if (strlen(c->url) < 6) { /* 6 is the minimum possible length (data:,) */ -- cgit v1.2.3