Jenkins之Log Parse的使用

     在初学使用Jenkins的同窗们,应该都遇到过经过bash或者cmd命令执行输出的日志,没办法作到对error, warning等状态的分析和统计。在这里就给他介绍一款实现此功能的插件Log Parse。此插件安装至关容易,但配置规则文件时,我踩了一坑,记录共享于同窗们。windows

规则文件绝对路径

image
固然,你的设置必定要从新加载,不然是无效的bash

规则文件相对路径:

在windows平台下,默认的根目录为C:\Windows\.SysWOW64\,因此须要把规则文件放到此目录下。ui

经常使用规则文件代码以下:

ok /not really/

# match line starting with 'error ', case-insensitive
error /error /

# list of warnings here...
warning /[Ww]arning/
warning /WARNING/

# create a quick access link to lines in the report containing 'INFO'
info /INFO/

# each line containing 'BUILD' represents the start of a section for grouping errors and warnings found after the line.
# also creates a quick access link.
start /BUILD/
相关文章
相关标签/搜索