Darek Kay's picture
Darek Kay
Solving web mysteries

Turn Notepad++ into a log file analyzer

Log file syntax highlighting in Notepad++

It's always a pain to analyze log files using a text editor. The good news is that Notepad++ supports user-defined languages natively, without the need to install any plugin. I wrote a custom syntax highlighter that turns Notepad++ into a basic log viewer. I've kept the highlighting to the minimum: green numbers, grey strings and custom colors for different log levels. Those colors are a huge improvement when scrolling through tons of black text.

Here's how to configure and enable the highlighter:

  1. Download this XML file.
  2. Click "Language""User Defined Language""Define your language""Import".
  3. Select the downloaded XML file.
  4. Restart the application.

Files with a .log extension automatically use this syntax highlighter, but you can always activate it manually for any other file: "Language""Log file".

I have written this configuration for Java logging (Log4J, Logback etc.), but it can be customized to work with other log patterns. Use the same settings dialog as above to adjust the colors and/or keywords, no XML hacking needed.

See also my other syntax files for Notepad++.
Turn Notepad++ into a log file analyzer