[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] when recommending new-format log lines, if the upper bound ...
- To: or-cvs@freehaven.net
- Subject: [or-cvs] when recommending new-format log lines, if the upper bound ...
- From: arma@seul.org (Roger Dingledine)
- Date: Tue, 7 Dec 2004 01:27:42 -0500 (EST)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Tue, 07 Dec 2004 01:28:08 -0500
- Reply-to: or-dev@freehaven.net
- Sender: owner-or-cvs@freehaven.net
Update of /home2/or/cvsroot/tor/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/tor/src/or
Modified Files:
config.c
Log Message:
when recommending new-format log lines, if the upper bound is LOG_ERR,
leave it implicit.
Index: config.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/config.c,v
retrieving revision 1.280
retrieving revision 1.281
diff -u -d -r1.280 -r1.281
--- config.c 4 Dec 2004 01:14:35 -0000 1.280
+++ config.c 7 Dec 2004 06:27:39 -0000 1.281
@@ -1170,7 +1170,7 @@
/* Special case if no options are given. */
if (!options->Logs) {
- options->Logs = config_line_prepend(NULL, "Log", "notice-err stdout");
+ options->Logs = config_line_prepend(NULL, "Log", "notice stdout");
}
if (config_init_logs(options, 1)<0) /* Validate the log(s) */
@@ -1896,10 +1896,11 @@
char buf[512];
int n;
- n = tor_snprintf(buf, sizeof(buf), "%s-%s %s%s%s",
+ n = tor_snprintf(buf, sizeof(buf), "%s%s%s %s%s%s",
log_level_to_string(minSeverity),
- log_level_to_string(maxSeverity),
- type, fname?" ":"", fname?fname:"");
+ maxSeverity == LOG_ERR ? "" : "-",
+ maxSeverity == LOG_ERR ? "" : log_level_to_string(maxSeverity),
+ type, fname?" ":"", fname?fname:"");
if (n<0) {
log_fn(LOG_WARN, "Normalized log option too long.");
return -1;