git » nmdb » commit 133b2d4

Make the default log file to be "-" (stdout).

author Alberto Bertogli
2007-08-08 21:16:16 UTC
committer Alberto Bertogli
2007-08-08 21:16:16 UTC
parent 3d4a89ec47ef1d3468c91d5655abce2fedb6b539

Make the default log file to be "-" (stdout).

If we default to NULL log file, we don't see startup errors, and it can be
quite frustrating if you don't know how to enable it by default.

This patch fixes this by making the default logging to be stdout, following
the principle of the least surprise.

Signed-off-by: Alberto Bertogli <albertito@gmail.com>

nmdb/main.c +1 -1

diff --git a/nmdb/main.c b/nmdb/main.c
index 65bd70b..ad3e36d 100644
--- a/nmdb/main.c
+++ b/nmdb/main.c
@@ -58,7 +58,7 @@ static int load_settings(int argc, char **argv)
 	settings.numobjs = -1;
 	settings.foreground = 0;
 	settings.passive = 0;
-	settings.logfname = NULL;
+	settings.logfname = "-";
 
 	settings.dbname = malloc(strlen(DEFDBNAME) + 1);
 	strcpy(settings.dbname, DEFDBNAME);