Problem: ch_log() text can be hard to find in the log file.
Solution: Prepend "ch_log()" to the text.
ch_log({msg} [, {handle}]) *ch_log()*
Write String {msg} in the channel log file, if it was opened
with |ch_logfile()|.
+ The text "ch_log():" is prepended to the message to make clear
+ it came from this function call and make it easier to find in
+ the log file.
When {handle} is passed the channel number is used for the
message.
{handle} can be a Channel or a Job that has a Channel. The
channel = get_channel_arg(&argvars[1], FALSE, FALSE, 0);
#endif
- ch_log(channel, "%s", msg);
+ // Prepend "ch_log()" to make it easier to find these entries in the
+ // logfile.
+ ch_log(channel, "ch_log(): %s", msg);
}
/*
call ch_log('%s%s')
call ch_logfile('')
let text = readfile('Xlog')
- call assert_match("hello there", text[1])
+ call assert_match("start log session", text[0])
+ call assert_match("ch_log(): hello there", text[1])
call assert_match("%s%s", text[2])
call mkdir("Xchlogdir1", 'D')
call assert_fails("call ch_logfile('Xchlogdir1')", 'E484:')
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 979,
/**/
978,
/**/