File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
src/java.base/linux/classes/jdk/internal/platform Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -104,8 +104,7 @@ public static CgroupMetrics create(Optional<CgroupTypeResult> optResult) {
104104 // not ready to deal with that on a per-controller basis. Return no metrics
105105 // in that case
106106 if (result .isAnyCgroupV1Controllers () && result .isAnyCgroupV2Controllers ()) {
107- Logger logger = System .getLogger ("jdk.internal.platform" );
108- logger .log (Level .DEBUG , "Mixed cgroupv1 and cgroupv2 not supported. Metrics disabled." );
107+ warn ("Mixed cgroupv1 and cgroupv2 not supported. Metrics disabled." );
109108 return null ;
110109 }
111110
@@ -121,6 +120,11 @@ public static CgroupMetrics create(Optional<CgroupTypeResult> optResult) {
121120 }
122121 }
123122
123+ private static void warn (String msg ) {
124+ Logger logger = System .getLogger ("jdk.internal.platform" );
125+ logger .log (Level .DEBUG , msg );
126+ }
127+
124128 /*
125129 * Determine the type of the cgroup system (v1 - legacy or hybrid - or, v2 - unified)
126130 * based on three files:
You can’t perform that action at this time.
0 commit comments