File tree Expand file tree Collapse file tree
dd-trace-api/src/main/java/datadog/trace/api Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -876,6 +876,7 @@ private static <V extends Enum<V>> Set<V> convertStringSetToEnumSet(
876876 private static Properties loadConfigurationFile () {
877877 Properties properties = new Properties ();
878878
879+ // Reading from system property first and from env after
879880 String configurationFilePath =
880881 System .getProperty (propertyNameToSystemPropertyName (CONFIGURATION_FILE ));
881882 if (null == configurationFilePath ) {
@@ -886,9 +887,13 @@ private static Properties loadConfigurationFile() {
886887 return properties ;
887888 }
888889
890+ // Normalizing tilde (~) paths for unix systems
891+ configurationFilePath = configurationFilePath .replaceFirst ("^~" , System .getProperty ("user.home" ));
892+
889893 // Configuration properties file is optional
890894 File configurationFile = new File (configurationFilePath );
891895 if (!configurationFile .exists ()) {
896+ log .error ("Configuration file '{}' not found." , configurationFilePath );
892897 return properties ;
893898 }
894899
You can’t perform that action at this time.
0 commit comments