Java Library to include text messages into stack traces
Java Kotlin
Latest commit aa0d51a Feb 16, 2017 @jonnyzzz upgrade Kotlin to 1.0.6
Permalink
Failed to load latest commit information.
gradle/wrapper
named-frames-kotlin/src
named-frames/src
.gitignore
.travis.yml
LICENSE.txt
README.md
build.gradle
gradlew
gradlew.bat
settings.gradle

README.md

Download Build Status

named-frames

This is a tiny java library to include any text messages into Java stack traces.

For example, one needs to include the message this is my named frame into the application stacktrace. The resulting stacktrace should be the following:

    java.lang.Exception
        at com.some.corp.something.Object.run
        at _.this is my named frame._(JavaGeneratorTemplate.java:24)
        at org.jonnyzzz.stack.NamedStackFrame.frame(NamedStackFrame.java:29)
        at com.some.corp.something.toTheJob(SomeSource.java:50)

This is done via the following code with the library

    NamedStackFrame.global().run("this is my named frame",
        new Runnable() {
            public void run() {
                 //here goes the code
            }
        });

There could be a number of nice use-cases for the library, for example

  • include product version on each stack trace
  • include heavy task details into the stack
  • and much more!

For more details, see the related blog post

Dependencies

The library does not have any non-optional dependencies to allow it to be widely used without dependencies resolution hell

License

MIT License

For more details, see LICENSE.txt in the repository

Building

The project is build with gradle

Binaries

Download

Binaries are uploaded to jcenter Gradle: just add

repositories {
  jcenter()
}

dependencies {
  compile 'org.jonnyzzz.named-frames:named-frames:<LATEST VERSION>'
}

See here for more details

Note

This is my (Eugene Petrenko) private home project

Support me: Donate