-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Add load/reloader logs #1628
Add load/reloader logs #1628
Conversation
Also add a new test to check it
Nice work knocking out a version of this already ! I suppose a simple string prefix is usable as my initial stack idea. However, I don't think I would expect each individual alias/plugin/completion/theme/etc file set the prefix directly. I think the
Here, each library gets the context (prefix) for free and only has to worry about logging messages. Just a few of these sprinkled throughout the bash-it core code would go a long way. |
Yes, I agree with @davidpfarrell - setting the prefix variable in the loader code loops (in For the reloader code, it would imagine it working like this:
Thoughts? |
What are we, animals !?
This is kinda what my stack idea as meant to address. I wouldn't want the code at the loop location to hard-code the You could also use this backup variable to abstract global context from the local loops:
Again, my stack idea was meant to enable these concepts using simpler push/pop semantics. Overall I think we're heading in a good direction ! -DF |
23f7a7b
to
8e34916
Compare
I did not yet implemented stack or even prev backup, but now there are many log messages and the prefix are set up correctly |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great - I've left some comments, please take a look.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry about the back and forth, didn't mean it to be this complicated, but I think it's important that we get this right... Some more review comments.
Thanks for working through this - looks great now! Is this ready-to-merge from your perspective? @davidpfarrell Comments, thoughts? |
Thanks so much for reviewing! In any case, we can add more logs to various components whenever we want to |
Merging this now - we can keep adding more logs as needed. |
Thanks again for the implementation, @NoahGorny - this is great! |
Thanks for merging @nwinkler |
Continuation of #1501
Also add prefix option for the logs, not by a stack, but rather by a variable set by the owning file
TODO: