jtroo / kanata

Improve keyboard comfort and usability with advanced customization
GNU Lesser General Public License v3.0
3.21k stars 131 forks source link

fix(gui): Open a log file on arg parsing errors #1055

Closed eugenesvk closed 6 months ago

eugenesvk commented 6 months ago

Describe your changes. Use imperative present tense.

On arg parsing errors at launch when there is no console to show errors to the user, create a kanata_log.txt¹ file to record all logging info and then open it with the OS default .txt handler

¹ txt to make sure some other system logger doesn't open it instead of a text editor, had some issues with this in the past on a Mac

(the proper future way would be to show a gui window, but then what if that fails ;) so this simple workaround would still be useful)

Also might be extended for personal statistics logging https://github.com/jtroo/kanata/issues/259, though that one would be useful with a better serializable format

(again based on top of other PR to avoid conflicts)

Checklist