summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShougo Matsushita <Shougo.Matsu@gmail.com>2016-03-24 07:42:37 +0900
committerShougo Matsushita <Shougo.Matsu@gmail.com>2016-03-24 07:42:37 +0900
commit21916d499f5c6234bd570d9248f4f14e2e72f133 (patch)
treed7750ea09587398664514c1e15b5ed3910f8d75d
parent42ad6b4d81cfd34beaa41afb6aa3469f865f3c5e (diff)
downloaddeoplete.nvim-21916d499f5c6234bd570d9248f4f14e2e72f133.zip
Rename deoplete#util#enable_logging() to deoplete#enable_logging()
-rw-r--r--autoload/deoplete.vim10
-rw-r--r--doc/deoplete.txt7
2 files changed, 14 insertions, 3 deletions
diff --git a/autoload/deoplete.vim b/autoload/deoplete.vim
index 944f0eb..ec01c42 100644
--- a/autoload/deoplete.vim
+++ b/autoload/deoplete.vim
@@ -8,4 +8,14 @@ function! deoplete#initialize() abort "{{{
return deoplete#init#enable()
endfunction"}}}
+function! deoplete#enable_logging(level, logfile) abort "{{{
+ if !deoplete#init#is_enabled()
+ " Enable to allow logging before completions start.
+ call deoplete#init#enable()
+ endif
+
+ call rpcrequest(g:deoplete#_channel_id,
+ \ 'deoplete_enable_logging', a:level, a:logfile)
+endfunction"}}}
+
" vim: foldmethod=marker
diff --git a/doc/deoplete.txt b/doc/deoplete.txt
index 7a7a73e..6519827 100644
--- a/doc/deoplete.txt
+++ b/doc/deoplete.txt
@@ -341,10 +341,11 @@ deoplete#custom#set({source-name}, {option-name}, {value})
call deoplete#custom#set('_',
\ 'disabled_syntaxes', ['Comment', 'String'])
<
- *deoplete#util#enable_logging()*
-deoplete#util#enable_logging({level}, {logfile})
+ *deoplete#enable_logging()*
+deoplete#enable_logging({level}, {logfile})
Enable logging for debugging purposes.
- Set {level} to DEBUG, INFO, WARNING, ERROR, or CRITICAL.
+ Set {level} to "DEBUG", "INFO", "WARNING", "ERROR", or
+ "CRITICAL".
{logfile} is the file where log messages are written.
Messages are appended to this file. Each log session will
start with "--- Deoplete Log Start ---".