mirror of
https://github.com/emikulic/darkhttpd.git
synced 2023-08-10 21:13:08 +03:00
Log to stdout by default.
This commit is contained in:
@@ -858,7 +858,7 @@ static void usage(void) {
|
|||||||
"\t\tSpecifies how many concurrent connections to accept.\n"
|
"\t\tSpecifies how many concurrent connections to accept.\n"
|
||||||
"\n");
|
"\n");
|
||||||
printf(
|
printf(
|
||||||
"\t--log filename (default: no logging)\n"
|
"\t--log filename (default: stdout)\n"
|
||||||
"\t\tSpecifies which file to append the request log to.\n"
|
"\t\tSpecifies which file to append the request log to.\n"
|
||||||
"\n");
|
"\n");
|
||||||
printf(
|
printf(
|
||||||
@@ -2335,7 +2335,9 @@ int main(int argc, char **argv) {
|
|||||||
init_sockin();
|
init_sockin();
|
||||||
|
|
||||||
/* open logfile */
|
/* open logfile */
|
||||||
if (logfile_name != NULL) {
|
if (logfile_name == NULL)
|
||||||
|
logfile = stdout;
|
||||||
|
else {
|
||||||
logfile = fopen(logfile_name, "ab");
|
logfile = fopen(logfile_name, "ab");
|
||||||
if (logfile == NULL)
|
if (logfile == NULL)
|
||||||
err(1, "opening logfile: fopen(\"%s\")", logfile_name);
|
err(1, "opening logfile: fopen(\"%s\")", logfile_name);
|
||||||
|
|||||||
Reference in New Issue
Block a user