-
Notifications
You must be signed in to change notification settings - Fork 7
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
Idea: Add new commands to the plugin (data import/export, getting debug logs...) #127
Comments
Hi @ognjen-vuceljic, For those commands, they can be easily defined by users separately as described here. It's hard for me to decide what should be part of the plugin or not. Maybe when I have the need or the plugin has more log-related features, I can add them into the plugin. Speaking of the colored Salesforce log, yes, in case users retrieve and view them locally, it makes sense to have syntax highlight. It might be a good idea to add a tree-sitter parser for Saleforce log, and give it a file type in this plugin. Thanks again for sharing all your thoughts and the bug feedback. I won't have the drive to implement the sign icon feature without your support. I added you into the contributor list 😄 hope you don't mind. (Because markdown doesn't show github default profile icon properly, you don't have it there.... |
How do you use the log locally? More context on this LinkedIn Post: https://www.linkedin.com/posts/xixiaofinland_salesforce-activity-7224647096610492416-hBEN?utm_source=share&utm_medium=member_desktop |
Thanks @xixiaofinland I usually download the log locally, and use one of 2 things in VS Code:
One thing I think would be extremely useful is highlighting the scope of a particular method inside log. For example, pairing Please see the example below: This is a simple example, but it allows us to understand when the execution details of The tricky part is when one method calls another, which adds call invocations into a stack. I think parsing the log as TXT file with some sort of fuzzy finding and searching would be a great start. For example, searching for lines that contain Hope this makes sense as a starting point :) |
@xixiaofinland I like the idea of Could you, please, share some examples how you use it? I do structure my debug statements in a way that clear ticket/JIRA identified is added, which makes search easier - but the issue is that those statements are scattered among multiple different log files, which can be quite big when we have queueables, future handlers, etc. Any examples of usage would be much appreciated :) |
This can be answered by GPT, pasted below. We insert
|
Thanks for sharing. Yes, once the parser is ready, this will be automatically supported.
|
Nvim-treesitter now has Update nvim-treesitter plugin to latest and add I will add this filetype into |
Hi @xixiaofinland ,
hope you're doing well today.
Just an idea - it might be good to consider adding more options to the plugin that can be triggered via hotkeys, in the same way as current ones do.
The commands that came to mind:
sf data import/export
forcedotcom/cli#2738
Sounds like Salesforce has invested some resources in improving those commands, so we now can pull more than 2 levels of child object data, plus handle >200 records (they will be split into batches), and much more as described in the link above.
Data export/import might be useful when we need to ensure that necessary data needs to be passed over from one environment to another.
sf apex get log
There could be some interesting use cases here in sf apex get log command.
For example, we could fetch the latest generated log from the org by running
sf apex get log --number 1 -o target_org
, or pass the--log-id
as parameter.We could easily run those commands in terminal outside of plugin, but just throwing out an idea here for brainstorming, to see if this is something that makes sense, and is worth investing time in.
Bonus question (nice to have):
sf apex get log
command, generate logs that are color-coded, which is quite useful for visualizing resultsOn the other hand, running anonymous apex comes with the same result structure, but no highlighting
Is this something we can standardize, so that printed commands are color coded (e.g. they have the filetype set to
log
, or something that would have syntax highlighting enabled).Thanks!
The text was updated successfully, but these errors were encountered: