Setup
Installing the Plugin
- IntelliJ IDEA --> Preferences --> Plugins --> Marketplace
- Search for Unlogged in the marketplace & Install
Adding the dependency
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!
Start your application in debug mode to call any java function directly.
DO NOT deploy Unlogged in production!
Unlogged adds probes in your code and causes noticeable performance degradation. We are working on a production-deployable version and will keep our documentation updated accordingly.
Disabling Unlogged
You can disable unlogged either in compile or runtime.
Compile Time
Run Time
Update the annotation
on top of your main method.
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