1. 第一个问题:时间少了8小时 Log4j 输出的日志中,时间比系统时间少了8小时,但是 eclipse 控制台输出的日志的时间却是对的. log4j配置如下: #all logger output level is 'ERROR' and output position is stdout #so only write our project's DEBUG log and ERROR log of the others log4j.rootLogger=ERROR, stdout, R #…
将日志中的json请求提取,并且发送到另外一个机器上: for i in ` cat impression.log.2016-04-08-10 |awk -F"\t" ' {print $6}' ` ; do curl "http://localhost:9888$i" ; done 使用cat 文件,read line 的形式实现 遍历行循环发送: #!/bin/bash cat data.txt | while read line do # echo $line…
今天在定位一个问题时,查看message日志,需要知道message日志中的记录分别是哪个Xterm终端操作的.比较了半天才发现原来日志中可以通过pts来进行区分.如下所示: --12T15:::|notice|[/bin/bash]|[-- :: root cd test/] return code=[], execute success by [root] from [pts/0 (9.4.90.52)] ], execute success by [root] from [pts/1 (9…