#3116: Do not fill in LogRecord caller data by default in slf4j wrapper
This commit is contained in:
		| @@ -585,6 +585,8 @@ public final class JDK14LoggerAdapter extends MarkerIgnoringBase implements Loca | |||||||
|     static String SELF = JDK14LoggerAdapter.class.getName(); |     static String SELF = JDK14LoggerAdapter.class.getName(); | ||||||
|     static String SUPER = MarkerIgnoringBase.class.getName(); |     static String SUPER = MarkerIgnoringBase.class.getName(); | ||||||
|  |  | ||||||
|  |     private static final boolean FILL_CALLER_DATA = Boolean.getBoolean( "net.md_5.bungee.slf4j-caller-data" ); | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * Fill in caller data if possible. |      * Fill in caller data if possible. | ||||||
|      *  |      *  | ||||||
| @@ -592,6 +594,10 @@ public final class JDK14LoggerAdapter extends MarkerIgnoringBase implements Loca | |||||||
|      *          The record to update |      *          The record to update | ||||||
|      */ |      */ | ||||||
|     final private void fillCallerData(String callerFQCN, LogRecord record) { |     final private void fillCallerData(String callerFQCN, LogRecord record) { | ||||||
|  |         if ( !FILL_CALLER_DATA ) | ||||||
|  |         { | ||||||
|  |             return; | ||||||
|  |         } | ||||||
|         StackTraceElement[] steArray = new Throwable().getStackTrace(); |         StackTraceElement[] steArray = new Throwable().getStackTrace(); | ||||||
|  |  | ||||||
|         int selfIndex = -1; |         int selfIndex = -1; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Janmm14
					Janmm14