将日志文件切分为您所需的时间过滤后的分段
Parses a log file and returns lines matching the time period provided. Chainsaw tries to be smart about determining the log format and parsing it accordingly. See the list of currently supported formats below.
Chronic is used to parse the time strings, so any format chronic supports, chainsaw supports. A list of supported formats can be found here: https://github.com/mojombo/chronic
gem install chainsaw> chainsaw access.log 1 hour ago # entries from one hour ago to now
> chainsaw access.log august # entries from August to now
> chainsaw access.log 2012-08-06 # entries from August 6th to now
> chainsaw access.log 2012-08-27 10:00 # entries from August 27th at 10:00 to now
# You can use a hypen to specify a time range (you can mix and match formats)
> chainsaw access.log 2012-08-01 - 2012-09-17 # entries within August 1st and September 17th
> chainsaw access.log july - yesterday # entries within July and yesterdayYou can specify an additional simple text pattern to filter (in addition to the time arguments) with the -f option.
> chainsaw access.log -f GET 1 hour agoYou can have chainsaw colorize the timestamp for easy scanning with the -c option.
> chainsaw access.log -c 1 hour agoIf you want to print a line and wait for input (press return) before moving to the next found line, you can use the -i option.
> chainsaw access.log -i 1 hour agoChainsaw will output the found log lines to a file on the system if you specify with -o FILENAME.
> chainsaw access.log yesterday -o yesterday.loggit checkout -b my-new-feature)git commit -am 'Added some feature')git push origin my-new-feature)暂无开放 Issues,或尚未同步最近议题。