Styling PaperTrail log output

We use papertrail to aggregate log data from our servers. Awesome tool. I wrote a simple GreaseMonkey script which highlights the names of our servers. Very easy to do. Could equally have built it in Stylish, but I already use GM, so that’s how it went. Here’s the code as per a request from Henry.

// ==UserScript==
// @name Papertrail styles
// @namespace
// @description Add some custom colours to our papertrail output
// @include*events*
// @author Callum Macdonald
// @copyright 2012 by Callum Macdonald
// @license GPL v3+
// @version 0.1
// @lastupdated 2012-08-29
// @grant GM_addStyle
// ==/UserScript==

// Simply inject an extra style element
#event_list li[data-system='foo'] .system a { background-color: red; }\
#event_list li[data-system='bar'] .system a { background-color: blue; }\
#event_list li[data-system='ba1'] .system a { background-color: yellow; }\
#event_list li[data-system='ba2'] .system a { background-color: green; }\
#event_list li[data-system='ba3'] .system a { background-color: purple; }\

Leave a Reply

Your email address will not be published. Required fields are marked *