Flow-Launcher / Flow.Launcher

:mag: Quick file search & app launcher for Windows with community-made plugins
https://flowlauncher.com
MIT License
7.66k stars 301 forks source link

Support change log level in settings #2317

Open rainyl opened 1 year ago

rainyl commented 1 year ago

Discussed in https://github.com/Flow-Launcher/Flow.Launcher/discussions/2313

Originally posted by **rainyl** August 30, 2023 I am one of the Flow plugin developers, I noticed that the default log level of Flow is INFO, I am wondering how to change the log level to DEBUG in Flow, thus I can debug my plugin more efficient using API.LogDebug() and needn't to worry bothering users because their default log level is INFO. For now, I can't find some settings to change log level, also, if it is currently not supported, I think it will be nice if added. Thanks.
taooceros commented 1 year ago

If you run flow in debug mode, the debug level will be changed to DEBUG instead of INFO. It shouldn't be a hard thing as you should already have the dotnet sdk installed. All you need is to clone flow and run it with whatever ide you used.

rainyl commented 1 year ago

thanks, but it will be more convenient if we can set it just in settings rather than run another debug version, hope it will be added in the future.

taooceros commented 12 months ago

thanks, but it will be more convenient if we can set it just in settings rather than run another debug version, hope it will be added in the future.

making sense.

github-actions[bot] commented 10 months ago

This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] commented 9 months ago

This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 5 days.

deefrawley commented 3 months ago

@taooceros is this still an issue we need to keep fresh?

rainyl commented 3 months ago

Well, fell free to close it if not planed.

VictoriousRaptor commented 3 months ago

It's not that easy to change. Logger is initialized at the very beginning. Maybe we can set to debug for default, after loading settings than set it to user defined level?

onesounds commented 3 months ago

Is this a hard task??? It doesn't matter if it doesn't reflect in real time. I think we could just put "loglevel" in config and apply it after restart, or even set it directly in json without a config ui. Am I thinking wrong?

+)https://github.com/Flow-Launcher/Flow.Launcher/discussions/2313 jjw's comment confirms that the debug log itself is meaningless. It is more correct to provide logs to make it easier for plugin developers to work with.

jjw24 commented 2 months ago

It's not that easy to change. Logger is initialized at the very beginning. Maybe we can set to debug for default, after loading settings than set it to user defined level?

Set it to 'Error' level as default, allow the change to 'Debug', request a restart of flow after the change if makes it simpler.