This is small project that contains Ammonite and Jbang that demonstrates how you can use Echopraxia to control logging dynamically while the script is running.
The documentation for scripting is here. The watch service will monitor the tweakflow file and recompile if it sees it has been touched.
The script uses Tweakflow, which is a secure embedded language. If you want to play around with Tweakflow, this is a good place to start.
To run, install scala-cli and then scala-cli ./script.sc
will print logs to console.
Then edit tweakflow.tf
while the program is running to see output either on or off.
Using Visual Studio Code is recommended as you can run scala-cli setup-ide .
to set up configuration, and run Metals.
There is also a Tweakflow mode for VS code.
To run, install JBang and then jbang Script.java
will print logs to console.