forked from jiajunhui/FileDownloader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
okcat.yml
61 lines (53 loc) · 3.17 KB
/
okcat.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
# you can use https://github.com/Jacksgong/okcat for debug filedownloader more gentle
# 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
# 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: 'data,time,level,tag,process,thread,message = "(.\S*) (.\S*) ([A-Z])/([^:[]*):\[(\d*):([^] ]*)\] (.*?)$"'
# 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\[([^\]]*)\]'
# 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-keyword-list:
- FileDownloader
# 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 corlored to highlight it
trans-msg-map:
# such as this case:
# origin message: 'filedownloader:lifecycle:over xxx'
# after translate: '| Task OVER | filedownloader:lifecycle:over xxx'
'filedownloader:lifecycle:over': 'Task OVER'
'fetch data with': 'Start Fetch'
# 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 corlored to highlight it
trans-tag-map:
# such as this case:
# origin message: 'FileDownloadApplication xxx'
# after translate: 'FileDownloadApplication [Thread Change] xxx'
'FileDownloadApplication': '[Thread Change]'
'DownloadTaskHunter': '[Status Change]'
'ConnectTask': '[Request]'
# 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 'hightlist-list' display on any message, the background of the value word would be colored to highlight it
highlight-list:
- 'Path['
- 'Url['
- 'Tag['
- 'range['