Should be trivial to create the logger itself using FileLogger which should be a member of the PluginProcessor class so that it persists.
The hard part is finding all aspects of osci-render where errors could possibly occur and logging them rather than silently ignoring them or hard crashing like we are at the moment!
Things that immediately come to mind are:
Server that sends data to software oscilloscope can fail to start
Server that receives Blender line data can fail to start ( #36 needs to be implemented first obv )
Critical errors with Lua
Could involve adding extra safety checks like making sure the lua script doesn't take too long to run and cancelling if it does and logging this
IF POSSIBLE: checks in any threads that use locking to wait on the audio thread to log to a file if they have waited for too long for audio (i.e. suspicion of deadlocks)
Examples of components that wait for the audio thread are anything that has a BufferConsumer, so AudioWebSocketServer, PitchDetector, VisualiserComponent, VolumeComponent.
Goes without saying that over-logging is much more important than under-logging as this is the number 1 most useful tool for debugging when you don't have access to a user's machine.
ASIDE: There should be a max log file size to prevent somehow using up all space on user's machine! (this mistake was made with legacy osci-render, oops)
Should be trivial to create the logger itself using FileLogger which should be a member of the PluginProcessor class so that it persists.
The hard part is finding all aspects of osci-render where errors could possibly occur and logging them rather than silently ignoring them or hard crashing like we are at the moment!
Things that immediately come to mind are:
Goes without saying that over-logging is much more important than under-logging as this is the number 1 most useful tool for debugging when you don't have access to a user's machine.
ASIDE: There should be a max log file size to prevent somehow using up all space on user's machine! (this mistake was made with legacy osci-render, oops)