diff --git a/config.def.h b/config.def.h index 2e6d37f..d5e0f45 100644 --- a/config.def.h +++ b/config.def.h @@ -35,12 +35,12 @@ static const linkStruct links[] = { /* * 0: Fatal errors * 1: Errors - * 2: Warnings + * 2: Normal output * 3: Info messages * 4: Verbose mode */ -static const int logLevel = 3; +static const int logLevel = 2; // Set the maximum amount of redirects curl will follow. // Use 0 to disable redirects, and -1 for no limit. diff --git a/minrss.c b/minrss.c index 0f6f265..b7e6a4c 100644 --- a/minrss.c +++ b/minrss.c @@ -82,7 +82,7 @@ itemAction(itemStruct *item, const char *folder) } if (newItems) - logMsg(2, "%d new articles for feed %s.\n", newItems, folder); + logMsg(2, "%s : %d new articles\n", folder, newItems); } void @@ -99,7 +99,7 @@ finish(char *url, long responseCode) } int -main(int argc, char *argv[]) +main(int argc, char *argv[]) { if (argc == 2 && !strcmp("-v", argv[1])) logMsg(0, "MinRSS %s\n", VERSION); @@ -126,7 +126,7 @@ main(int argc, char *argv[]) logMsg(3, "Finished downloads.\n"); for (i = 0; i < LEN(links); i++) { - logMsg(4, "Parsing %s\n", links[i].url); + logMsg(5, "Parsing %s\n", links[i].url); if (outputs[i].buffer && outputs[i].buffer[0]) { readDoc(outputs[i].buffer, links[i].feedName, itemAction); diff --git a/util.c b/util.c index 8ad87a0..211218e 100644 --- a/util.c +++ b/util.c @@ -23,8 +23,14 @@ logMsg(int lvl, char *msg, ...) va_list args; va_start(args, msg); - if (lvl <= logLevel) - vfprintf(stderr, msg, args); + if (lvl <= logLevel) { + if (lvl == 2) { + vfprintf(stdout, msg, args); + } else { + vfprintf(stderr, msg, args); + fprintf(stderr, "minrss: "); + } + } va_end(args);