Log Marker is a Chrome Extension to highlight words / phrases in plain-text log or text files, e.g. server log files, by coloring the matched text. Multiple search words / phrases / regular expressions can be entered and saved via the large text box in the Options page (one per line) of the extension. Overlapping matches (e.g. hen in comprehension or man and nor in manor) are supported as well such that the largest matching chunk of text is highlighted with one color. Just save your search words in the extension's Options page and click the Log Marker icon in Chrome to highlight the matches!
Internally, the extension relies on Chrome wrapping the file's contents in a <pre> tag. This is done automatically by Chrome as soon as the page is loaded. Matches are searched in the first (and in the case of a server log, only) <pre> tag. To highlight the matches, the original HTML is modified. To reset the original formatting just reload the page.
Consider the line below as some text from a plain-text file opened in Chrome:
Multiple search words / phrases / regular expressions can be entered and saved via the large text box in the Options page (one per line) of the extension.
To highlight words such as "Multiple", simply enter Multiple in the textarea in the Options page (See "Version" in screenshot below). Since the extension uses regular expressions for matching, characters such as +, ., (, ), etc. have special meanings and need to be prefixed by a \. E.g. To highlight the phrase "(one per line)" it needs to be specified as \(one per line\). The last example in the screenshot is a regular expression to match a word that begins with two digits, then a character, then followed by 4 digits (it matches "15G1010").
Nikhil Patwardhan
© 2017 Nikhil Patwardhan, All Rights Reserved.