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/
相關文章
相關標籤/搜索