-
Notifications
You must be signed in to change notification settings - Fork 1
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
[ZCO-230] Provide different output styles #3
Comments
Hi thanks for your plugin and it really saves my time. And I am also +1 for different output styles. Especially my log outputs json with have lots of line breaks, which will break the table styles easy. I think the most obvious way is just wrapping each result of each call of
|
@fyears Thanks for the suggestion. Quick question, how do you work with the log output? Do you get files from your users, or do you use it locally on your own log output? I'm asking because I believe there are two ways to deal with the output:
Logstravaganza was initially written for (1) but I've realized that having it output NDJSON (as an option) would be beneficial for (2). |
Hi! I debug my plugin on ios and find your plugin very useful. However, in my plugin I use lots of |
Got it, thank you! I've played around with NDJSON (newline delimited JSON) which is great for streaming structured data to the terminal. Every line is a JSON object, so keeping an eye on new log entries from the terminal is easy:
That said, I've decided to add NDJSON logging for sure but I might add other formats, too! |
so are you going to output ndjson files? i am concerned that whether it's directly readbale in obsidian... |
Yes, I'll add them. My internal timeline got screwed over hard due to some emergencies related to my for-purchase apps. Since those are what keeps me afloat, they'll always have highest priority. 😉
They are. The user has to enable Settings → Files and links → Detect all file extensions to see them in the file explorer, however. |
But are they readable in obsidian? or, say, need vscode to read? I mean, the plugin is very useful on iOS where there is no console. I believe the generated note being directly readable (i.e. in markdown format) in Obsidian is greatly useful. |
And would you like to accept pull requests? I could contribute to the project by adding even more output formats if you’d like. |
No, it wouldn't be readable in Obsidian; I believe Obsidian simply hands it over to the OS, saying "deal with it, it's not one of mine". Here's a test file, simply drop it in your vault to test it out: LOGGING-NOTE (Chonky-Boi).json For this file, the extension would be
Yes! But please let me implement the general settings & output format handling first. I have a rather clear idea of what it's going to look like, and have it sketched out already, but there's no code to show yet. Give me a few days, please. It's on my plate for this week! |
OK!! I am looking forward to it! Thank you so much! |
Work has begun. I'll keep you posted, @fyears :) |
The release/2.0.x branch is my WIP. I've rewritten the whole plugin, basically. There's a new settings tab and a rather simple formatters system – basically, for each output format there's a little object, containing metadata and a formatting function. That function is called for every intercepted console message, and returns the new line to be written to the output file. Take a look. I'll release that version before Tuesday, and then I'll be open to PR's ;) |
Sure! |
Implemented, will be rolled out in the upcoming v2.0.0. |
@fyears The big update is out – let me know if you have questions regarding the formatters or anything. Feel free to hit me up on the Plugin Forum ("Log in with GitHub" is enabled!), or on Mastodon or Bluesky. |
Right now, there's only the table style but it might be worthwhile to also provide a more traditional console log output style and/or CSV etc.
Should be configurable via a Settings view.
ZCO-230
The text was updated successfully, but these errors were encountered: