Permalink
Browse files

Logging

  • Loading branch information...
1 parent c3f4369 commit 2019d916bd182ed0831b9f8cde3f9df067b1debe @davidstrauss davidstrauss committed Dec 14, 2012
Showing with 6 additions and 7 deletions.
  1. +6 −7 src/log.c
View
@@ -27,15 +27,14 @@ void log_set_minimum_verbosity(int verbosity) {
}
int log_print(int verbosity, const char *format, ...) {
- int r;
+ int r = 0;
va_list ap;
- if (verbosity >= minimum_verbosity)
- return 0;
-
- va_start(ap, format);
- r = sd_journal_printv(verbosity, format, ap);
- va_end(ap);
+ if (verbosity >= minimum_verbosity) {
+ va_start(ap, format);
+ r = sd_journal_printv(verbosity, format, ap);
+ va_end(ap);
+ }
return r;
}

0 comments on commit 2019d91

Please sign in to comment.