INFINITE-TECHNOLOGY / SPEEDOMETER

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Infinite Logging ∞ BlackBox

1. Project status

Project is in pre-release phase.

It is suitable only for experimental usage.

Warning
Do not use on Production until stable release is published.

2. Purpose

BlackBox is a solution to automatically generate Groovy Semantic logging code and inject it into User code during the Compilation stage resulting in a possibility to produce and review exhaustive application runtime data in a form of XML files with XSD model based on simplified Groovy AST class model - by the means of developing and using a BlackBox Annotation,Groovy Annotation.

3. In short

BlackBox Annotation automatically injects a lot of logging code into user-defined Groovy methods/constructors without affecting the user program logic.
Granularity of injected code can be defined by the user (programmer) up to:

  • Method Exception handling transformation, Method Exceptions logging (exception and causing method arguments are logged)

  • Method transformation, Method invocation logging (method arguments and result are logged)

  • Statement transformation, Statement-level logging

  • Expression transformation, Expression-level logging

5. Try it now!

Run the below code in Groovy Console:

@GrabResolver(name='infinite.io', root='https://i-t.io/m2')
@Grab(group='io.infinite', module='blackbox', version='2.0.0')

import io.infinite.blackbox.*

@BlackBox(blackBoxLevel=BlackBoxLevel.EXPRESSION)
String foobar(String foo) {
    String bar = "bar"
    String foobar = foo + bar
    return foobar
}
System.setProperty("blackbox.mode", BlackBoxMode.SEQUENTIAL.value())

foobar("foo")

About

License:Apache License 2.0


Languages

Language:Groovy 89.4%Language:Batchfile 10.6%