mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-22 20:16:54 +03:00
do not attempt to log when output is not enabled
This commit is contained in:
parent
3a633acc3f
commit
3f3e7de6d9
25
utils/log.c
25
utils/log.c
@ -105,20 +105,21 @@ netsurf_render_log(void *_ctx,
|
||||
const char *fmt,
|
||||
va_list args)
|
||||
{
|
||||
if (verbose_log) {
|
||||
fprintf(logfile,
|
||||
"%s %.*s:%i %.*s: ",
|
||||
nslog_gettime(),
|
||||
ctx->filenamelen,
|
||||
ctx->filename,
|
||||
ctx->lineno,
|
||||
ctx->funcnamelen,
|
||||
ctx->funcname);
|
||||
|
||||
fprintf(logfile,
|
||||
"%s %.*s:%i %.*s: ",
|
||||
nslog_gettime(),
|
||||
ctx->filenamelen,
|
||||
ctx->filename,
|
||||
ctx->lineno,
|
||||
ctx->funcnamelen,
|
||||
ctx->funcname);
|
||||
vfprintf(logfile, fmt, args);
|
||||
|
||||
vfprintf(logfile, fmt, args);
|
||||
|
||||
/* Log entries aren't newline terminated add one for clarity */
|
||||
fputc('\n', logfile);
|
||||
/* Log entries aren't newline terminated add one for clarity */
|
||||
fputc('\n', logfile);
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user