-
Notifications
You must be signed in to change notification settings - Fork 468
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
remove escape characters from the logs #831
Comments
Thanks for the report, should be fixed in #832
|
ty for PR. any advice on how to debug lua plugins ? |
If the plugin does not exist or fails to execute, an error message will be appended to the log file. For example, if I specify a nonexistent # yazi.toml
[plugin]
prepend_previewers = [
{ mime = "audio/*", run = "test" },
] I get the following log when I hover over the audio file:
|
I had my plugin in append_previewers, if I move it to prepend_previewers it gets used and I see the log you mention. I wonder if the doc at https://yazi-rs.github.io/docs/configuration/yazi/#plugin is correct:
shouldn't it be prepend_rules instead ? so right now I see
in my logs because of this line in my script
but yazi-plugin/preset/plugins/pdf.lua does use |
Hi, the document is correct, if you use a wildcard name rule in yazi/yazi-config/preset/yazi.toml Lines 122 to 123 in e619a97
which is useful for users who need to customize fallback behavior. It's a combination of append and wildcard. Regarding the second question, As for displaying errors in the preview panel, this only applies to previewer plugins, and it will scatter errors - sometimes errors will appear in the preview pane (if developing a previewer), and sometimes they will appear in the log file, which can be confusing, and preview pane is also not a good place to display errors - it currently does not support line breaks, so long errors will be truncated. |
yes that was it.
I understand no problem, it was just an idea that popped in my mind when facing the issue ;) The following is a bunch of comments partly for me to remember, that might deserve their own tickets but :
|
gentle ping in case you forgot about this @sxyazi . The answers I am most interested at are for 4 and 5 as this is something I could leverage for my plugins. |
Sorry for the late reply:
|
thank you, you are the goat ;) |
I'm going to lock this issue because it has been closed for 30 days. ⏳ |
Done in #1802 🎉 |
Please describe the problem you're trying to solve
hi,
as excited as the first time for yazi, clearly the best out there. So I decided for fun and convenience to try implementing a lua previewer for some files.
Of course it doesn't work so I tried looking at the logs to have more details:
First of all I think yazi shouldn't use those escape charaters or is it intended ?
And I found no information about my plugins.
I tried
yazi --debug
with no more information.Would you be willing to contribute this feature?
Describe the solution you'd like
Would be nice to list the plugins in the log at startup, or in --debug. Or even add subcommands like
yazi plugin list
oryazi config previewers
Additional context
version 0.2.4
No response
The text was updated successfully, but these errors were encountered: