The script logging only enables logging with in the script to debug the script itself..the only other option besides what you stated above would be to enable logging the traditional way, save off the bin files in the install dir to someplace on the device.. turn logging off on the profile.. when you need logging you could swap out the bin files for the saved off ones but even this is cumbersome to do
I had thought about that option, but that would be problematic if other Emulation Parameters were changed after the fact. Meaning if I created a custom TermCfg.bin file using this process with Logging Enabled and stored it on the device it wouldn't receive the same updates if the main Emulation Parameters were later changed in any way. I would either have to constantly maintain the logging version of the TermCfg.bin file or live with the fact that other Emulation Parameters might differ between the two versions of the file when I temporarily swapped them out.
It's a shame there isn't a way to trigger it from a key press within the TelnetCE session. It'd also be pretty cool if you could Enable or Disable it through a custom Avalanche Property so that it could be a sortable value in the inventory.
Are there any APIs that could be called from another application? Could I write a custom application that would open the TermCfg.Bin and set the logging to enabled on demand? I feel like not since the TermCfg.bin file seems kind of encrypted or obfuscated but I've done something similar before for dynamically setting Printer Values. It seems to be somewhat human readable...
What happens if you specify a directory that doesn't exist on the device? I'm thinking I could specify an invalid directory in the Emulation Parameters for Network Traffic Log file so that there would be a placeholder in the TermCfg.Bin that I could then modify programmatically on demand. If specifying an invalid directory prevents logging from being actually enabled then that might just work perfectly.
an incorrect directory would work however a message would pop up every time you started the profile that the path is invalid..
As for editing the bin file and restarting the client.. I have actually never tried before.. I suppose it would work if we knew exactly what lines are being added to the bin..