Skip to content

feature: Option to disable logs #235

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
polirritmico opened this issue Nov 15, 2024 · 1 comment
Closed

feature: Option to disable logs #235

polirritmico opened this issue Nov 15, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@polirritmico
Copy link

Is your feature request related to a problem? Please describe.

Hi! great plugin!

Currently there's no option to disable the log mechanism. Personally, I don't care about the logs of a UI enhancement plugin unless I'm trying to address some kind of issue or providing details for a bug report.

Describe the solution you'd like

Add an "off" option to completely disable the log generation.

Describe alternatives you've considered

Maybe even consider the use of vim.log.levels to the config like other plugins (e.g. Neotest, Conform, Mason) as it already provides DEBUG, ERROR, WARN and OFF levels definitions (but also INFO and TRACE):

log_level = vim.log.levels.OFF, -- or WARN, etc.

Additional information

No response

@polirritmico polirritmico added the enhancement New feature or request label Nov 15, 2024
MeanderingProgrammer added a commit that referenced this issue Nov 18, 2024
## Details

Request: #235

Adds option to set "off" as value for log_level.

This should prevent any logs from being written to the log file.

The default value is kept as "error".

Minor changes to how buffer level locking works to include file name in
all cases to ease debugging.
@MeanderingProgrammer
Copy link
Owner

Sure, added here: 48a52dd.

For the time being I like having a separate definition since values like TRACE and WARN have no meaning. So you'll need to set a value of 'off'.

require('render-markdown').setup({
    log_level = 'off',
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants