tersesystems / smallest-dynamic-logging-example

Example Ammonite and JBang Scripts showing Dynamic Logging in Tweakflow

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Smallest Possible Dynamic Logging Project

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.

Scala CLI

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.

JBang

To run, install JBang and then jbang Script.java will print logs to console.

About

Example Ammonite and JBang Scripts showing Dynamic Logging in Tweakflow

License:Apache License 2.0


Languages

Language:Scala 50.2%Language:Java 49.8%