forked from hswyxj/okcat
/
base.yml
70 lines (60 loc) · 3.65 KB
/
base.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# we will filter out logs with the provided package (name)
# this 'package' keyword is just using for android adb logcat
# package: com.liulishuo.filedownloader.demo
# tag keyword list
# this list keyword is using for filter out which log need to be output
# all provided keyword will be using for compare with each line tag, if a line with tag not contain any keyword on 'tag-keyword-list' it will be ignore to output
# 如下tag,用于打印java崩溃,ANR, Native 崩溃日志
tag-keyword-list:
'AndroidRuntime': W,E
'ActivityManager': E
'DEBUG': F
# this 'log-line-regex' is just a regex for one line log
# now we support keyword: 'data' 'time' 'level' 'tag' 'process' 'thread' 'message'
# you don't have to provide all keyword, but you have to provide at least the 'message'
# such as: 'message="(\S*)"'
log-line-regex: 'date,time,process,thread,level,tag,message = "(.\S*) *(.\S*) *(\d*) *(\d*) *([A-Z]) *([^:]*):\s*(.*)$"'
# on the case of filter logs from Android adb logcat, we using 'adb logcat -v brief -v threadtime' command to obtain logcat
# in the normal case you don't need ot provide this config, because there is a perfect one on the okcat internal
# but if you want to customize the regex log from adb logcat, it's free to define it such below
# adb-log-line-regex: 'data,time,process,thread,level,tag,message="(.\S*) *(.\S*) *(\d*) *(\d*) *([A-Z]) *([^:]*): *(.*?)$"'
# separator regex list
# you can provide multiple regex to separate serial logs
separator-regex-list:
# on this case, if one line log match 'call start Url\[([^\]]*)\]' regex we will separate logs with \n and output a indie line with the '([^\]]*)' value as the title of separate
#- 'call start Url\[([^\]]*)\]'
# translate message map
# if a message on a line start with provide keyword on the 'trans-msg-map' we will add the value of the keyword on the start of the message, and the word of value will be colored to highlight it
trans-msg-map:
# such as this case:
# origin message: 'filedownloader:lifecycle:over xxx'
# after translate: '| Task OVER | filedownloader:lifecycle:over xxx'
'event=SEND_EVENT.*name":"(\w*)': "上报事件"
# 接收指令的转译内容,过滤FinishHandleDirective
'^((?!FinishHandleDirectives)\w*)\s*receive directive:': "收到指令"
'Start proc (\d+):([\w\.]+)': "启动进程"
'eventType:ACTIVITY_RESUMED, packageName:([\w\.]+)': "页面进前台"
'eventType:ACTIVITY_PAUSED, packageName:([\w\.]+)': "页面进后台"
'FATAL EXCEPTION:': "Java崩溃"
'START u\d+ \{flg=0x[01]+ cmp=([\w\.]+)': "启动页面"
'Fatal signal \d+\s+.*pid\s+(\d+)\s+(.*)': "Native崩溃"
'ANR in ([\w\.]+)': "无响应ANR"
# translate tag map
# if a tag on a line contain provide keyword on the 'trans-tag-map' we will add the value of the keyword on the start of the message, and the background of the value word will be colored to highlight it
trans-tag-map:
# such as this case:
# origin message: 'FileDownloader.DownloadTaskHunter xxx'
# after translate: 'FileDownloader.DownloadTaskHunter [Status Change] xxx'
# 'ConnectTask': '[Request]'
# 'DownloadTaskHunter': '[Status Change]'
# hide message list
# if a message on a line start with provide value on the 'hide-msg-list` and the length of the message is less than 100 word, it would be colored with gray to hide
hide-msg-list:
# here we hide message start with 'notify progress' and '~~~callback' because it is too frequently to output and useless in most case
# - 'notify progress'
# - '~~~callback'
# highlight list
# if any value on the 'highlight-list' display on any message, the background of the value word would be colored to highlight it
highlight-list:
#- 'WifiLinkLayerStatus'
#- 'WifiLinkLay'