patch 8.2.4742: there is no way to start logging very early in startup
Problem: There is no way to start logging very early in startup.
Solution: Add the --log argument. Include the date in the start message in
the log file. Avoid a duplicate message when forking. Log an
executed shell command.
diff --git a/runtime/doc/channel.txt b/runtime/doc/channel.txt
index a306abb..01756f1 100644
--- a/runtime/doc/channel.txt
+++ b/runtime/doc/channel.txt
@@ -633,8 +633,8 @@
is going on in real time.
To enable the log very early, to see what is received from a
- terminal during startup, use |--cmd|: >
- vim --cmd "call ch_logfile('logfile', 'w')"
+ terminal during startup, use |--log|: >
+ vim --log logfile
<
This function is not available in the |sandbox|.
NOTE: the channel communication is stored in the file, be
diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt
index 1600441..9a4014b 100644
--- a/runtime/doc/starting.txt
+++ b/runtime/doc/starting.txt
@@ -344,6 +344,12 @@
Example: >
vim -V20vimlog foobar
<
+--log {filename} *--log*
+ Start logging and write entries to {filename}.
+ This works like calling `ch_logfile({filename}, 'a')` very
+ early during startup.
+ {only available with the +channel feature}
+
*-D*
-D Debugging. Go to debugging mode when executing the first
command from a script. |debug-mode|
@@ -564,6 +570,7 @@
{scriptout} cannot start with a digit.
If you want to record what is typed in a human readable for
you can use |ch_logfile()|, It adds "raw key input" lines.
+ Also see |--log|.
*-W*
-W {scriptout} Like -w, but do not append, overwrite an existing file.