Commit fab84a7
committed
feat(logger): Add a log module
Currently the plugin uses vim.notify for almost all logging and can get
quite noisy. Many neovim systems and plugins log to files in
$XDG_STATE_DIR. This introduces a logging module and logs to a default
file. There is also some bookkeeping stuff in here too.
- Add `config.log`
- Default log file is `$XDG_STATE_DIR/nvim/eca.log`
- Default display mode is a buffer, can also display in a popup
- Default log level is vim.log.levels.INFO
- Default max file size before warning is 10MB
- Remove `config.debug`
- Create `Logger` module. Has the regular logging functions as well as
`Logger.notify` for displaying a notification via `vim.notify`
- Add subcommands to EcaLogs ("show", "log_path", "clear", "stats"),
`EcaLogs` called with no arguments runs `EcaLogs show`
- Replace calls to Utils logging functions with Logger
- Fix the github action to run the tests1 parent f0ace79 commit fab84a7
15 files changed
Lines changed: 1237 additions & 515 deletions
File tree
- .github/workflows
- lua/eca
- scripts
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
0 commit comments