Skip to content

Commit 2ef65c5

Browse files
authored
logger log filter modify path not contains dot (#666)
* Filtering the log of one task to the log of another task * Filtering the log of one task to the log of another task update * rollback * The log shows confusion * update loggerserver * update * datasource connect error modify * rollback code,logger server log filter ,process variables modify local variables * Client ip changes, sessionId cannot be accessed modify * mr and spark task tenant queue set error modify * tenant queryById modify * update * update * update * update * TaskSchedulerThread TaskProps setTenantCode * logger filter modify * logger log filter modify path not contains dot
1 parent 715b696 commit 2ef65c5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

escheduler-server/src/main/java/cn/escheduler/server/rpc/LoggerServer.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ private static String readFile(String path){
196196
errorLineFlag = filterLine(path,line);
197197
}
198198

199-
if (!errorLineFlag || !line.startsWith("TaskLogger")){
199+
if (!errorLineFlag || !line.contains("TaskLogger")){
200200
sb.append(line + "\r\n");
201201
}
202202
}
@@ -224,7 +224,7 @@ private static String readFile(String path){
224224
* @return
225225
*/
226226
private static boolean filterLine(String path,String line){
227-
String removeSuffix = path.split("\\.")[0];
227+
String removeSuffix = path.substring(0, path.length() - 4);
228228
String[] strArrs = removeSuffix.split("/");
229229
String taskAppId = String.format("%s_%s_%s",
230230
strArrs[strArrs.length - 3],

0 commit comments

Comments
 (0)