mirror of
https://gitee.com/jd-platform-opensource/jlog.git
synced 2024-11-29 10:28:19 +08:00
作者回来了
This commit is contained in:
parent
9e1f8f1ae0
commit
eb58745398
@ -21,6 +21,11 @@
|
||||
<artifactId>snakeyaml</artifactId>
|
||||
<version>1.28</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>1.7.32</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
@ -2,7 +2,6 @@ package com.jd.platform.jlog.core;
|
||||
|
||||
import com.jd.platform.jlog.common.handler.CompressHandler;
|
||||
import com.jd.platform.jlog.common.handler.CompressHandler.Outcome;
|
||||
import com.jd.platform.jlog.common.handler.ExtractHandler;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
package com.jd.platform.jlog.core;
|
||||
|
||||
import com.jd.platform.jlog.common.handler.CompressHandler;
|
||||
import com.jd.platform.jlog.common.handler.ExtractHandler;
|
||||
import com.jd.platform.jlog.common.handler.TagConfig;
|
||||
|
||||
/**
|
||||
|
@ -1,22 +1,21 @@
|
||||
package com.jd.platform.jlog.common.handler;
|
||||
package com.jd.platform.jlog.core;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.jd.platform.jlog.common.handler.TagConfig;
|
||||
import com.jd.platform.jlog.common.utils.CollectionUtil;
|
||||
import com.jd.platform.jlog.common.utils.ConfigUtil;
|
||||
import com.jd.platform.jlog.common.utils.StringUtil;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import static com.jd.platform.jlog.common.constant.Constant.EXTRACT_MIN_LEN;
|
||||
import static com.jd.platform.jlog.common.constant.Constant.TAG_NORMAL_KEY;
|
||||
import static com.jd.platform.jlog.common.constant.Constant.TAG_NORMAL_KEY_MAX_LEN;
|
||||
import static com.jd.platform.jlog.common.constant.Constant.*;
|
||||
import static com.jd.platform.jlog.common.handler.CollectMode.*;
|
||||
import static com.jd.platform.jlog.common.handler.CollectMode.E_LOG;
|
||||
import static com.jd.platform.jlog.common.handler.CollectMode.E_REQ;
|
||||
import static com.jd.platform.jlog.common.utils.ConfigUtil.RANDOM;
|
||||
|
||||
/**
|
||||
@ -204,16 +203,4 @@ public class ExtractHandler {
|
||||
static String str3 = "||a=1||eee||b=2";
|
||||
static String str4 = "||a=1||eee||b=2||";
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
|
||||
//### INSTANCE:TagHandler{reqTags=[uid, url], logTags=[node, bizType],
|
||||
// delimiter='|', delimiterLen=1, join='"="', pattern="", extract=41}
|
||||
//### .content:|errno=val3||node=val4||这是随便的log|
|
||||
System.out.println("msgByRegular1==> "+JSON.toJSONString(extractTest(str1)));
|
||||
/* System.out.println("msgByRegular2==> "+JSON.toJSONString(extractTest(str2)));
|
||||
System.out.println("msgByRegular3==> "+JSON.toJSONString(extractTest(str3)));
|
||||
System.out.println("msgByRegular4==> "+JSON.toJSONString(extractTest(str4)));*/
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user