Chromium (Google Chrome) Console logs
When launching Chrome or Chromium, you can redirect the console
logs in a file like this :
/opt/chromium/chrome-wrapper --enable-logging=stderr --log-level=0 | grep --line-buffered "INFO:CONSOLE" | grep --line-buffered -v "chrome-extension" >> /var/log/chromium-console.log &
Then use this configuration:
"chromium": {
"display" : "Chromium Javascript Console",
"path" : "\/var\/log\/chromium-console.log",
"refresh" : 1,
"notify" : true,
"format" : {
"regex" : "|^\\[(.*):(.*):(..)(..)/(..)(..)(..):INFO:CONSOLE\\((.*)\\)\\] \"(.*)(\", source: (.*) \\(.*\\))*$|U",
"match" : {
"Date": [ "2014\/" , 3 , "\/" , 4 , " " , 5 , ":" , 6 , ":" , 7 ],
"Line":8,
"Console":9,
"Referer":11
},
"types" : {
"Date":"date:d\/m H:i:s \/100",
"Line":"numeral",
"Console":"pre",
"Referer":"link"
}
}
}
It will match these logs:
[14615:14615:0122/071740:INFO:CONSOLE(18)] "Coucou !", source: http://192.168.7.90:81/sit/2845/www/ (18)
[14615:14615:0122/071740:INFO:CONSOLE(19)] "Uncaught ReferenceError: potsky is not defined", source: http://192.168.7.90:81/sit/2845/www/ (19)
[19791:19791:0122/072315:INFO:CONSOLE(18)] "{"a":[1,2,{"b":"c"}]}
[18992:18992:0122/072450:INFO:CONSOLE(18)] "{"a":[1,2,{"b":"c"}]}", source: http://192.168.7.90:81/sit/2845/www/ (18)