plover icon indicating copy to clipboard operation
plover copied to clipboard

Add system name to strokes log

Open Willem3141 opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe.

I regularly switch systems to be able to write in two different languages (English and Dutch). I also like running statistics on my strokes log to see, for example, which are the dictionary entries I use most. However, as the strokes log doesn't contain the current system name, it is not (easily) possible to distinguish in which language any stroke was done.

I do most of my system switches with steno strokes, so they do show up as strokes in the log:

2021-04-14 16:30:20,579 Translation(('*RB',) : "{PLOVER:SWITCH_SYSTEM:English Stenotype}")

But this is not really reliable, because I also sometimes use the settings window to switch.

Describe the solution you'd like

Besides the existing log message types Stroke and Translation, add a new type of log entry (e.g. SystemSwitch) that is written whenever the system was switched.

Describe alternatives you've considered

An alternative could be to add the name of the active system to each Translation entry. This would make the analysis a bit easier, but probably costs more disk space.

Willem3141 avatar Apr 24 '21 12:04 Willem3141

You should be able to write a plugin that listens to config_changed events and write a Plover log message (plover.log.info) accordingly. (it won't go to the strokes.log file however, but you might be able to also listen for on_stroked and log the whole thing)

user202729 avatar Apr 24 '21 13:04 user202729