Skip to content
Snippets Groups Projects
Commit 85f56718 authored by rswindell's avatar rswindell
Browse files

If error and console messages are redirected to files (using -e and -o options)

echo error messages to status output (default: stderr) as well.
parent 57cd96ef
No related branches found
No related tags found
No related merge requests found
......@@ -146,9 +146,12 @@ int lprintf(int level, char *fmt, ...)
return(ret);
}
#endif
if(level<=err_level)
if(level<=err_level) {
ret=fprintf(errfp,"%s\n",sbuf);
if(level>err_level || (errfp!=stderr && errfp!=confp))
if(errfp!=stderr && confp!=stdout)
ret=fprintf(statfp,"%s\n",sbuf);
}
if(level>err_level || errfp!=stderr)
ret=fprintf(confp,"%s\n",sbuf);
return(ret);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment