// Log file opened with ch_logfile().
static FILE *log_fd = NULL;
+static char_u *log_name = NULL;
#ifdef FEAT_RELTIME
static proftime_T log_start;
#endif
if (*fname != NUL)
ch_log(NULL, "closing this logfile, opening %s", fname);
else
- ch_log(NULL, "closing logfile");
+ ch_log(NULL, "closing logfile %s", log_name);
fclose(log_fd);
}
semsg(_(e_notopen), fname);
return;
}
+ vim_free(log_name);
+ log_name = vim_strsave(fname);
}
log_fd = file;
# ifdef FEAT_JOB_CHANNEL
if (ch_log_active())
- // close the log file in the child
+ {
+ ch_log(NULL, "closing channel log in the child process");
ch_logfile((char_u *)"", (char_u *)"");
+ }
# endif
if (!show_shell_mess || (options & SHELL_EXPAND))