Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
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@v3.8.1/function/vim/mod.ts";

Start logging channel activity to {fname}. When {fname} is an empty string: stop logging. When {mode} is omitted or "a" append to the file. When {mode} is "w" start with an empty file. 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 |--cmd|: vim --cmd "call ch_logfile('logfile', 'w')" 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<unknown>