Mercurial > vim
comparison src/channel.c @ 28435:0533e7466ef0 v8.2.4742
patch 8.2.4742: there is no way to start logging very early in startup
Commit: https://github.com/vim/vim/commit/c9a9a0ac1ec3b985d38c01ddf9f0ba2f15386f34
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Apr 12 15:09:23 2022 +0100
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 12 Apr 2022 16:15:03 +0200 |
parents | d6892ed619e0 |
children | 4dcccb2673fe |
comparison
equal
deleted
inserted
replaced
28434:dfef2e002d5b | 28435:0533e7466ef0 |
---|---|
176 } | 176 } |
177 log_fd = file; | 177 log_fd = file; |
178 | 178 |
179 if (log_fd != NULL) | 179 if (log_fd != NULL) |
180 { | 180 { |
181 fprintf(log_fd, "==== start log session ====\n"); | 181 fprintf(log_fd, "==== start log session %s ====\n", |
182 get_ctime(time(NULL), FALSE)); | |
183 // flush now, if fork/exec follows it could be written twice | |
184 fflush(log_fd); | |
182 #ifdef FEAT_RELTIME | 185 #ifdef FEAT_RELTIME |
183 profile_start(&log_start); | 186 profile_start(&log_start); |
184 #endif | 187 #endif |
185 } | 188 } |
186 } | 189 } |