Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
import java.util.List;
import java.util.Properties;

import com.alibaba.csp.sentinel.log.RecordLog;

/**
* <p>
* Util class for loading configuration from file or command arguments.
Expand Down Expand Up @@ -75,7 +77,7 @@ private static Properties loadPropertiesFromAbsoluteFile(String fileName) {
properties.load(bufferedReader);
}
} catch (Throwable e) {
e.printStackTrace();
RecordLog.warn("Failed to load properties from absolute file: {}", fileName, e);
}
return properties;
}
Expand All @@ -102,7 +104,7 @@ private static Properties loadPropertiesFromClasspathFile(String fileName) {
list.add(urls.nextElement());
}
} catch (Throwable e) {
e.printStackTrace();
RecordLog.warn("Failed to get resources from classpath: {}", fileName, e);
}

if (list.isEmpty()) {
Expand All @@ -117,7 +119,7 @@ private static Properties loadPropertiesFromClasspathFile(String fileName) {
p.load(bufferedReader);
properties.putAll(p);
} catch (Throwable e) {
e.printStackTrace();
RecordLog.warn("Failed to load properties from URL: {}", url, e);
}
}
return properties;
Expand Down