mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 17:30:04 +08:00
fix(logger): fix derived logger
This commit is contained in:
parent
02fadf00ff
commit
de6efc650c
@ -234,6 +234,10 @@ else
|
|||||||
let self._debug_mode = 0
|
let self._debug_mode = 0
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
function! s:derive.debug_enabled() abort
|
||||||
|
return self._debug_mode
|
||||||
|
endfunction
|
||||||
|
|
||||||
function! SpaceVim#logger#derive(name) abort
|
function! SpaceVim#logger#derive(name) abort
|
||||||
let s:derive.derive_name = printf('%' . strdisplaywidth(s:LOGGER.get_name()) . 'S', a:name)
|
let s:derive.derive_name = printf('%' . strdisplaywidth(s:LOGGER.get_name()) . 'S', a:name)
|
||||||
return deepcopy(s:derive)
|
return deepcopy(s:derive)
|
||||||
|
8
bundle/tagbar/autoload/tagbar.vim
vendored
8
bundle/tagbar/autoload/tagbar.vim
vendored
@ -1278,7 +1278,7 @@ function! s:ProcessFile(fname, ftype) abort
|
|||||||
|
|
||||||
let ctags_output = s:ExecuteCtagsOnFile(tempfile, a:fname, typeinfo)
|
let ctags_output = s:ExecuteCtagsOnFile(tempfile, a:fname, typeinfo)
|
||||||
|
|
||||||
if !tagbar#log#enabled()
|
if !tagbar#log#debug_enabled()
|
||||||
call delete(tempfile)
|
call delete(tempfile)
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
@ -1404,7 +1404,7 @@ function! s:ExecuteCtagsOnFile(fname, realfname, typeinfo) abort
|
|||||||
\ ]
|
\ ]
|
||||||
|
|
||||||
" verbose if debug enabled
|
" verbose if debug enabled
|
||||||
if tagbar#log#enabled()
|
if tagbar#log#debug_enabled()
|
||||||
let ctags_args += [ '-V' ]
|
let ctags_args += [ '-V' ]
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -3155,7 +3155,7 @@ function! s:ExecuteCtags(ctags_cmd) abort
|
|||||||
set shellcmdflag=/s\ /c
|
set shellcmdflag=/s\ /c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if tagbar#log#enabled()
|
if tagbar#log#debug_enabled()
|
||||||
silent 5verbose let ctags_output = system(a:ctags_cmd)
|
silent 5verbose let ctags_output = system(a:ctags_cmd)
|
||||||
call tagbar#log#debug(v:statusmsg)
|
call tagbar#log#debug(v:statusmsg)
|
||||||
call tagbar#log#debug('Exit code: ' . v:shell_error)
|
call tagbar#log#debug('Exit code: ' . v:shell_error)
|
||||||
@ -4052,7 +4052,7 @@ endfunction
|
|||||||
|
|
||||||
" tagbar#printfileinfo() {{{2
|
" tagbar#printfileinfo() {{{2
|
||||||
function! tagbar#printfileinfo() abort
|
function! tagbar#printfileinfo() abort
|
||||||
if !tagbar#log#enabled()
|
if !tagbar#log#debug_enabled()
|
||||||
echo 'Tagbar debug is disabled - unable to print fileinfo to tagbar log'
|
echo 'Tagbar debug is disabled - unable to print fileinfo to tagbar log'
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
|
4
bundle/tagbar/autoload/tagbar/log.vim
vendored
4
bundle/tagbar/autoload/tagbar/log.vim
vendored
@ -30,6 +30,6 @@ function! tagbar#log#info(msg) abort
|
|||||||
call s:LOGGER.info(a:msg)
|
call s:LOGGER.info(a:msg)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! tagbar#log#enabled() abort
|
function! tagbar#log#debug_enabled() abort
|
||||||
return s:LOGGER.enabled()
|
return s:LOGGER.debug_enabled()
|
||||||
endfunction
|
endfunction
|
||||||
|
@ -139,7 +139,7 @@ function M.derive(name)
|
|||||||
function derive.stop_debug()
|
function derive.stop_debug()
|
||||||
derive._debug_mode = false
|
derive._debug_mode = false
|
||||||
end
|
end
|
||||||
function derive.enabled() -- {{{
|
function derive.debug_enabled() -- {{{
|
||||||
return derive._debug_mode
|
return derive._debug_mode
|
||||||
end
|
end
|
||||||
-- }}}
|
-- }}}
|
||||||
|
Loading…
Reference in New Issue
Block a user