Browse Source

Improve standard output message in LogBase (#1357)

master
于玉桔 GitHub 4 years ago
parent
commit
670b2cb764
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions
  1. +5
    -5
      sentinel-core/src/main/java/com/alibaba/csp/sentinel/log/LogBase.java

+ 5
- 5
sentinel-core/src/main/java/com/alibaba/csp/sentinel/log/LogBase.java View File

@@ -84,10 +84,10 @@ public class LogBase {
if (!LOG_OUTPUT_TYPE_FILE.equalsIgnoreCase(logOutputType) && !LOG_OUTPUT_TYPE_CONSOLE.equalsIgnoreCase(logOutputType)) { if (!LOG_OUTPUT_TYPE_FILE.equalsIgnoreCase(logOutputType) && !LOG_OUTPUT_TYPE_CONSOLE.equalsIgnoreCase(logOutputType)) {
logOutputType = LOG_OUTPUT_TYPE_FILE; logOutputType = LOG_OUTPUT_TYPE_FILE;
} }
System.out.println("INFO: log output type is: " + logOutputType);
System.out.println("INFO: Sentinel log output type is: " + logOutputType);


logCharSet = properties.getProperty(LOG_CHARSET) == null ? logCharSet : properties.getProperty(LOG_CHARSET); logCharSet = properties.getProperty(LOG_CHARSET) == null ? logCharSet : properties.getProperty(LOG_CHARSET);
System.out.println("INFO: log charset is: " + logCharSet);
System.out.println("INFO: Sentinel log charset is: " + logCharSet);




logBaseDir = properties.getProperty(LOG_DIR) == null ? logBaseDir : properties.getProperty(LOG_DIR); logBaseDir = properties.getProperty(LOG_DIR) == null ? logBaseDir : properties.getProperty(LOG_DIR);
@@ -95,14 +95,14 @@ public class LogBase {
File dir = new File(logBaseDir); File dir = new File(logBaseDir);
if (!dir.exists()) { if (!dir.exists()) {
if (!dir.mkdirs()) { if (!dir.mkdirs()) {
System.err.println("ERROR: create log base dir error: " + logBaseDir);
System.err.println("ERROR: create Sentinel log base directory error: " + logBaseDir);
} }
} }
System.out.println("INFO: log base dir is: " + logBaseDir);
System.out.println("INFO: Sentinel log base directory is: " + logBaseDir);


String usePid = properties.getProperty(LOG_NAME_USE_PID); String usePid = properties.getProperty(LOG_NAME_USE_PID);
logNameUsePid = "true".equalsIgnoreCase(usePid); logNameUsePid = "true".equalsIgnoreCase(usePid);
System.out.println("INFO: log name use pid is: " + logNameUsePid);
System.out.println("INFO: Sentinel log name use pid is: " + logNameUsePid);
} }






Loading…
Cancel
Save