Skip to contentSkip to conversation

Fix logging logic in output().

PATCH In review Artem Savkov 2 participants 2 messages Feb 17, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix logging logic in output().

Commit "preparation for different forms of logging." contained a typo that broke logging to mainlogfile.

---
 log.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
log.c +1 -1
index dbac844..aee5a67 100644
@@ -103,7 +103,7 @@ void output(unsigned char level, const char *fmt, ...)
 	}
 
 	/* go on with file logs only if enabled */
-	if (logging == LOGGING_FILES)
+	if (logging == LOGGING_DISABLED)
 		return;
 
 	handle = find_logfile_handle();
Signature · 1 line
2.5.0
#1 lore raw
Quoted 13 lines · Artem Savkov

Commit "preparation for different forms of logging." contained a typo that broke logging to mainlogfile.

---
 log.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
log.c +0 -0
index dbac844..aee5a67 100644

log.c void output(unsigned char level, const char *fmt, ...) · line 107

Quoted 6 lines
log.c +1 -1
@@ -103,7 +103,7 @@ void output(unsigned char level, const char *fmt, ...)
 	}
 
 	/* go on with file logs only if enabled */
-	if (logging == LOGGING_FILES)
+	if (logging == LOGGING_DISABLED)
 		return;

Duh, yeah, that's pretty silly. This prep work still hasn't materialised into other forms of logging, but for now this is the obvious fix.

thanks,
Dave