mirror of
https://github.com/mirror/wget.git
synced 2025-01-22 18:21:03 +08:00
Fixed #44516 -o- not logging to stdout
src/log.c (log_init): check for hypen on filename, set stdout
This commit is contained in:
parent
12bae50b28
commit
e04c5989ff
@ -597,6 +597,12 @@ void
|
|||||||
log_init (const char *file, bool appendp)
|
log_init (const char *file, bool appendp)
|
||||||
{
|
{
|
||||||
if (file)
|
if (file)
|
||||||
|
{
|
||||||
|
if (HYPHENP (file))
|
||||||
|
{
|
||||||
|
logfp = stdout;
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
logfp = fopen (file, appendp ? "a" : "w");
|
logfp = fopen (file, appendp ? "a" : "w");
|
||||||
if (!logfp)
|
if (!logfp)
|
||||||
@ -605,6 +611,7 @@ log_init (const char *file, bool appendp)
|
|||||||
exit (WGET_EXIT_GENERIC_ERROR);
|
exit (WGET_EXIT_GENERIC_ERROR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* The log goes to stderr to avoid collisions with the output if
|
/* The log goes to stderr to avoid collisions with the output if
|
||||||
|
Loading…
Reference in New Issue
Block a user