Conversation
|
I can definitely see benefits here, but I'm also curious if the multiple log files will make it more challenging to grab data from users when they need support. The functionality itself looks good, but will wait for @Core447 to chime in |
|
Nevermind, I see my confusion. This doesn't replace the base plugin logger, this creates a new logger specifically for troubleshooting. I think this is a good start, but I think this could be expanded upon a little more to make it more user friendly. Something like the following:
I think the only thing missing from your implementation is the ability to call the troubleshoot function from StreamController somewhere. I think this would be better than putting inside a specific action as we may want to troubleshoot some part of the plugin that is preventing actions from loading. |
|
I want to replace the Plugin Logger with this, its in my opinion a better way and it provides a dedicated "space" for every Plugin to use. Adding the button to the settings that starts a troubleshoot/diagnostic sounds like a good idea! Under I would create 2 methods: |
…d always showing a troubleshooting section
|
@ImDevinC could you take a look again? Added everything you wanted/needed |
|
This change now results in the following (Its a long line): The code for this is very simple: async def troubleshoot(self, *args, **kwargs):
self.log(f"Troubleshooting for action: {self.__class__.__name__} on ",
selected_device=self.selected_device,
device_filter=self.device_filter,
info_content=self.info_content,
show_info_content=self.show_info_content,
device_name=self.device_nick,
show_device_name=self.show_device_name,
use_standard=self.use_standard_device,
loaded_devices=self.loaded_devices,
icon_keys=self.icon_keys,
current_icon_name=self._icon_name) |
|
This looks great, thanks for putting it together so quickly! |
|
Alright opened it for merge! Now we just have to wait and see what @Core447 thinks |
|
@Core447 bumping this aswell. what do you think? |
|
I like it. Only reason I'm not merging yet is a very selfish one: I don't have very much experience with all things logging, and I want to try a bit around with it, so that I understand it better and can work with this myself. Hope I can merge soon |
This adds Plugin Based logging to StreamController.
It adds a log file for every plugin using loguru.
I added custom file retention as Im using date/time based log names that are different on every start. I did this because that makes it easy to only display the latest informations in the about window of the plugin