File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed
main/java/io/opentelemetry/javaagent/bootstrap
test/java/io/opentelemetry/javaagent/bootstrap Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change 88import java .text .MessageFormat ;
99import java .util .ResourceBundle ;
1010import java .util .function .Supplier ;
11+ import java .util .logging .Filter ;
1112import java .util .logging .Handler ;
1213import java .util .logging .Level ;
1314import java .util .logging .LogRecord ;
@@ -329,6 +330,8 @@ public Handler[] getHandlers() {
329330
330331 public void addHandler (Handler handler ) {}
331332
333+ public void removeHandler (Handler handler ) {}
334+
332335 public static PatchLogger getAnonymousLogger () {
333336 return getLogger ("" );
334337 }
@@ -341,6 +344,18 @@ public static PatchLogger getGlobal() {
341344 return global ;
342345 }
343346
347+ public static void setFilter (Filter filter ) {}
348+
349+ public static Filter getFilter () {
350+ return null ;
351+ }
352+
353+ public static void setUseParentHandlers (boolean useParentHandlers ) {}
354+
355+ public static boolean getUseParentHandlers () {
356+ return true ;
357+ }
358+
344359 private static String getMessage (LogRecord record ) {
345360 String msg = record .getMessage ();
346361 Object [] params = record .getParameters ();
Original file line number Diff line number Diff line change @@ -48,9 +48,6 @@ void testImplementsAllMethods() {
4848 Set <MethodSignature > julLoggerMethods = new HashSet <>();
4949 for (Method method : java .util .logging .Logger .class .getMethods ()) {
5050 String methodName = method .getName ();
51- if (methodName .contains ("Handler" ) || methodName .contains ("Filter" )) {
52- continue ;
53- }
5451 MethodSignature builder = new MethodSignature ();
5552 builder .name = methodName ;
5653 List <String > parameterTypes = new ArrayList <>();
You can’t perform that action at this time.
0 commit comments