Skip to content

Setup

Installing the Plugin

  • IntelliJ IDEA --> Preferences --> Plugins --> Marketplace
  • Search for Unlogged in the marketplace & Install

Adding the dependency

<dependency>
  <artifactId>unlogged-sdk</artifactId>
  <groupId>video.bug</groupId>
  <version>LATEST</version>
</dependency>
dependencies
{
    implementation 'video.bug:unlogged-sdk:LATEST'
    annotationProcessor 'video.bug:unlogged-sdk:LATEST'
}

Sync your project once so that the Unlogged dependency is downloaded from maven repository.

Adding the annotation

To start recording method input and return values - add @Unlogged annotation just above your main method.

Here is an example.

   @Unlogged
   public static void main(String[] args) {
        SpringApplication.run(JwtDemoApplication.class, args);
    }

Clean, and Debug!

mvn clean
gradle clean

Start your application in debug mode to call any java function directly.

Disabling Unlogged

You can disable unlogged either in compile or runtime.

Compile Time

mvn package -Dunlogged.disable
./gradlew build -Dunlogged.disable

Run Time

Update the annotation on top of your main method.

@Unlogged(enable = false)

Remember

Note that when you disable the annotation in runtime, the logging probes are still added to your code. But they won't log anything, since the enable flag is set to false