From 14b2a777085b60f2b0fba4cfc8407d9228758f44 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Mon, 13 Dec 2021 13:24:01 +0100 Subject: improve default logging I use to have logging enabled to be able to debug weird vis-lspc behavior right away. But I got annoyed by vis-lspc cluttering all my directories with vis-lspc.log files. So vis-lspc will no write its log files to $XDG_DATA_HOME/vis-lspc/-.log if lspc.log_file is not set by the user. This patch also introduces a helper to run a program and capture its output. --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index ed990ff..a882907 100644 --- a/README.md +++ b/README.md @@ -104,7 +104,8 @@ Available fields are: * `name = 'vis-lspc'` - the name vis-lspc introduces itself to a language server * `logging = false` - enable logging only useful for debugging vis-lspc -* `log_file = 'vis-lspc.log'` - file vis-lspc writes all log messages to +* `log_file = nil` - nil, filename or function returning a filename + * If `log_file` is `nil` vis-lspc will create a new file in `$XDG_DATA_HOME/vis-lspc` * `autostart = true` - try to start a language server in WIN_OPEN * `menu_cmd = 'fzf' or 'vis-menu'` - program to prompt for user choices * `confirm_cmd = 'vis-menu'` - program to prompt for user confirmation -- cgit v1.2.3