Fix some jul messages
MODIFY
instrumentation-api-semconv/src/main/java/io/opentelemetry/instrumentation/api/internal/DeprecatedConfigPropertyWarning.java
instrumentation-api-semconv/src/main/java/io/opentelemetry/instrumentation/api/internal/DeprecatedConfigPropertyWarning.java
@@ -24,7 +24,7 @@ public final class DeprecatedConfigPropertyWarning {
if (config.getString(deprecatedPropertyName) != null) {
logger.log(
WARNING,
- "Deprecated property '{0}' was used; use the '{1}' property instead",
+ "Deprecated property \"{0}\" was used; use the \"{1}\" property instead",
new Object[] {deprecatedPropertyName, newPropertyName});
}
}

MODIFY
instrumentation/external-annotations/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/extannotations/ExternalAnnotationInstrumentation.java
instrumentation/external-annotations/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/extannotations/ExternalAnnotationInstrumentation.java
@@ -118,7 +118,7 @@ public class ExternalAnnotationInstrumentation implements TypeInstrumentation {
} else if (!configString.matches(CONFIG_FORMAT)) {
logger.log(
WARNING,
- "Invalid trace annotations config '{0}'. Must match 'package.Annotation$Name;*'.",
+ "Invalid trace annotations config \"{0}\". Must match 'package.Annotation$Name;*'.",
configString);
return Collections.emptySet();
} else {

MODIFY
instrumentation/micrometer/micrometer-1.5/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/micrometer/v1_5/TimeUnitParser.java
instrumentation/micrometer/micrometer-1.5/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/micrometer/v1_5/TimeUnitParser.java
@@ -49,7 +49,7 @@ final class TimeUnitParser {
if (logger.isLoggable(WARNING)) {
logger.log(
WARNING,
- "Invalid base time unit: '{0}'; using 'ms' as the base time unit instead",
+ "Invalid base time unit: \"{0}\"; using 'ms' as the base time unit instead",
value);
}
return TimeUnit.MILLISECONDS;

MODIFY
javaagent-tooling/src/main/java/io/opentelemetry/javaagent/tooling/config/ConfigInitializer.java
javaagent-tooling/src/main/java/io/opentelemetry/javaagent/tooling/config/ConfigInitializer.java
@@ -75,7 +75,7 @@ public final class ConfigInitializer {
// Configuration properties file is optional
File configurationFile = new File(configurationFilePath);
if (!configurationFile.exists()) {
- logger.log(SEVERE, "Configuration file '{0}' not found.", configurationFilePath);
+ logger.log(SEVERE, "Configuration file \"{0}\" not found.", configurationFilePath);
return properties;
}
@@ -83,11 +83,11 @@ public final class ConfigInitializer {
new InputStreamReader(new FileInputStream(configurationFile), StandardCharsets.UTF_8)) {
properties.load(reader);
} catch (FileNotFoundException fnf) {
- logger.log(SEVERE, "Configuration file '{0}' not found.", configurationFilePath);
+ logger.log(SEVERE, "Configuration file \"{0}\" not found.", configurationFilePath);
} catch (IOException ioe) {
logger.log(
SEVERE,
- "Configuration file '{0}' cannot be accessed or correctly parsed.",
+ "Configuration file \"{0}\" cannot be accessed or correctly parsed.",
configurationFilePath);
}

MODIFY
javaagent-tooling/src/main/java/io/opentelemetry/javaagent/tooling/config/MethodsConfigurationParser.java
javaagent-tooling/src/main/java/io/opentelemetry/javaagent/tooling/config/MethodsConfigurationParser.java
@@ -44,7 +44,7 @@ public final class MethodsConfigurationParser {
} else if (!validateConfigString(configString)) {
logger.log(
WARNING,
- "Invalid trace method config '{0}'. Must match 'package.Class$Name[method1,method2];*'.",
+ "Invalid trace method config \"{0}\". Must match 'package.Class$Name[method1,method2];*'.",
configString);
return Collections.emptyMap();
} else {

MODIFY
muzzle/src/main/java/io/opentelemetry/javaagent/tooling/muzzle/generation/MuzzleCodeGenerator.java
muzzle/src/main/java/io/opentelemetry/javaagent/tooling/muzzle/generation/MuzzleCodeGenerator.java
@@ -156,7 +156,7 @@ final class MuzzleCodeGenerator implements AsmVisitorWrapper {
if (logger.isLoggable(INFO)) {
logger.log(
INFO,
- "The '{0}' method was already found in class '{1}'. Muzzle will not generate it again",
+ "The \"{0}\" method was already found in class \"{1}\". Muzzle will not generate it again",
new Object[] {muzzleVirtualFieldsMethodName, instrumentationClassName});
}
}

Fix some jul messages (#5930)