Created
April 21, 2020 18:33
-
-
Save ExC0d3/0e3eaf4ba424dfd652a8c00e894201df to your computer and use it in GitHub Desktop.
log4j stack trace with formatting.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.weareethic.vertx; | |
| import lombok.extern.slf4j.Slf4j; | |
| @Slf4j | |
| public class Test { | |
| public static void call(int i) { | |
| if (i == 0) { | |
| throw new IllegalArgumentException("Reached argument 0"); | |
| } else { | |
| call(--i); | |
| } | |
| } | |
| public static void main(String[] args) { | |
| try { | |
| call(10); | |
| } catch (Exception e) { | |
| log.error("Error in [{}]", Thread.currentThread().getName(), e); | |
| } | |
| } | |
| } | |
| /** | |
| * | |
| */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment