Permalink
Browse files

Verbosity fix

  • Loading branch information...
1 parent dee16e3 commit b3781eb614215c1fa436eb6b93afd158cf0525c6 @davidstrauss davidstrauss committed Dec 14, 2012
Showing with 6 additions and 6 deletions.
  1. +1 −1 src/fusedav.c
  2. +4 −4 src/log.c
  3. +1 −1 src/log.h
View
@@ -1753,7 +1753,7 @@ int main(int argc, char *argv[]) {
//config.verbosity = 3;
// Apply debug mode.
- log_set_minimum_verbosity(config.verbosity);
+ log_set_maximum_verbosity(config.verbosity);
debug = (config.verbosity >= 7);
log_print(LOG_DEBUG, "Log verbosity: %d.", config.verbosity);
log_print(LOG_DEBUG, "Parsed options.");
View
@@ -20,17 +20,17 @@
#include "log.h"
-static int minimum_verbosity;
+static int maximum_verbosity;
-void log_set_minimum_verbosity(int verbosity) {
- minimum_verbosity = verbosity;
+void log_set_maximum_verbosity(int verbosity) {
+ maximum_verbosity = verbosity;
}
int log_print(int verbosity, const char *format, ...) {
int r = 0;
va_list ap;
- if (verbosity >= minimum_verbosity) {
+ if (verbosity <= maximum_verbosity) {
va_start(ap, format);
r = sd_journal_printv(verbosity, format, ap);
va_end(ap);
View
@@ -21,7 +21,7 @@
#include <systemd/sd-journal.h>
-void log_set_minimum_verbosity(int verbosity);
+void log_set_maximum_verbosity(int verbosity);
int log_print(int verbosity, const char *format, ...);
#endif

0 comments on commit b3781eb

Please sign in to comment.