com.tersesystems.blindsight.scripting

Type members

Classlikes

class FileScriptHandle(val path: Path, verifier: String => Boolean, reporter: Throwable => Unit) extends ScriptHandle

A script handle that uses a direct path and verifies it. Errors are sent to the reporter.

A script handle that uses a direct path and verifies it. Errors are sent to the reporter.

class ScriptAwareLogger(core: CoreLogger, scriptManager: ScriptManager) extends Impl

A logger that runs through a script manager for every predicate. The script manager is responsible for evaluating the script and return true or false. The only thing the logger does here is pass through sourcecode information and the level.

A logger that runs through a script manager for every predicate. The script manager is responsible for evaluating the script and return true or false. The only thing the logger does here is pass through sourcecode information and the level.

If the script fails or throws an exception, the underlying predicate is called as the default.

class ScriptBasedLocation(sm: ScriptManager, default: Boolean)

A script condition manager that returns conditions tied to a script that can evaluate based on the source code.

A script condition manager that returns conditions tied to a script that can evaluate based on the source code.

This can be useful when you only want some logging statements to be evaluated on a script basis.

val location = new ScriptBasedLocation(sm, false)
logger.debug.when(location.here) { debug =>
 debug("Hello world!")
}
Value Params
default

the default to return if the script does not complete.

sm

the script manager

A script handle returns the script source, and can say if the script is invalid.

A script handle returns the script source, and can say if the script is invalid.

class ScriptManager(handle: ScriptHandle)

A script manager that parses and evaluates tweakflow scripts.

A script manager that parses and evaluates tweakflow scripts.