mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-09 13:10:03 +08:00
Fix viewlog
This commit is contained in:
parent
63def49d81
commit
25f2175f56
@ -43,11 +43,10 @@ function! SpaceVim#logger#viewLog(...) abort
|
|||||||
let l = a:0 > 0 ? a:1 : 1
|
let l = a:0 > 0 ? a:1 : 1
|
||||||
if filereadable(s:logger_file)
|
if filereadable(s:logger_file)
|
||||||
let logs = readfile(s:logger_file, '')
|
let logs = readfile(s:logger_file, '')
|
||||||
else
|
|
||||||
let logs = []
|
|
||||||
echom '[ SpaceVim ] : logger file ' . s:logger_file . ' does not exists!'
|
|
||||||
endif
|
|
||||||
return join(filter(logs, "v:val =~# '\[ SpaceVim \] \[\d\d\:\d\d\:\d\d\] \[" . s:levels[l] . "\]'"), "\n")
|
return join(filter(logs, "v:val =~# '\[ SpaceVim \] \[\d\d\:\d\d\:\d\d\] \[" . s:levels[l] . "\]'"), "\n")
|
||||||
|
else
|
||||||
|
return '[ SpaceVim ] : logger file ' . s:logger_file . ' does not exists!'
|
||||||
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
""
|
""
|
||||||
|
Loading…
Reference in New Issue
Block a user