Skip to main content
Deno 2 is finally here ๐ŸŽ‰๏ธ
Learn more
Module

x/denops_std/function/vim/mod.ts>ch_logfile

๐Ÿ“š Standard module for denops.vim
Go to Latest
function ch_logfile
import { ch_logfile } from "https://deno.land/x/denops_std@v6.3.0/function/vim/mod.ts";

Start logging channel activity to {fname}. When {fname} is an empty string: stop logging.

When {mode} is omitted or contains "a" or is "o" then append to the file. When {mode} contains "w" and not "a" start with an empty file. When {mode} contains "o" then log all terminal output. Otherwise only some interesting terminal output is logged.

Use ch_log() to write log messages. The file is flushed after every message, on Unix you can use "tail -f" to see what is going on in real time.

To enable the log very early, to see what is received from a terminal during startup, use --log (this uses mode "ao"):

vim --log logfile

This function is not available in the sandbox. NOTE: the channel communication is stored in the file, be aware that this may contain confidential and privacy sensitive information, e.g. a password you type in a terminal window.

Can also be used as a method:

'logfile'->ch_logfile('w')

Parameters

denops: Denops
fname: unknown
optional
mode: unknown

Returns

Promise<void>