ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Log Highlight

by poucotm ST2/ST3

🔦 Plugin for Sublime Text 2/3, Log Highlight helps to view a log (any type) supporting customizable log syntax & color scheme, extensible severity levels, clickable links

Details

Installs

  • Total 5K
  • Win 2K
  • OS X 2K
  • Linux 755
Sep 19 Sep 18 Sep 17 Sep 16 Sep 15 Sep 14 Sep 13 Sep 12 Sep 11 Sep 10 Sep 9 Sep 8 Sep 7 Sep 6 Sep 5 Sep 4 Sep 3 Sep 2 Sep 1 Aug 31 Aug 30 Aug 29 Aug 28 Aug 27 Aug 26 Aug 25 Aug 24 Aug 23 Aug 22 Aug 21 Aug 20 Aug 19 Aug 18 Aug 17 Aug 16 Aug 15 Aug 14 Aug 13 Aug 12 Aug 11 Aug 10 Aug 9 Aug 8 Aug 7 Aug 6 Aug 5
Windows 21 21 8 11 18 21 21 9 9 1 3 7 11 14 10 5 2 8 11 17 11 5 2 3 1 15 8 6 8 10 3 3 7 9 8 13 9 3 1 8 9 10 12 12 1 0
OS X 13 6 3 2 15 13 3 6 5 3 4 6 9 8 6 4 2 2 4 5 11 2 4 1 3 8 6 11 5 4 3 1 5 6 3 5 5 1 2 6 2 8 2 4 4 0
Linux 1 6 1 3 3 5 6 1 5 1 1 1 4 4 5 4 1 1 0 2 3 3 3 0 2 5 2 2 3 2 0 1 6 3 4 0 1 0 0 0 5 1 3 8 0 1

Readme

Source
raw.​githubusercontent.​com

Log Highlight for Sublime Text

Package Control PayPal

Log Highlight helps to view a log (any type) with customizable error/warning syntax & color scheme & extensible severity levels. Open a log file (like .log) and run Log Highlight in the context menu or Log Highlight : Highlight Error/Warning in the command palette.

(Compile Log - auto-highlight off)
Image of Log Highlight

(Build Window - auto-highlight on)
Image of Log Highlight

(System Log - auto-highlight off)
Image of Log Highlight

Features


  • Customizable Syntax & Color Scheme
  • Extensible Severity Levels
  • Separate log types : “compile”, “system”
  • Add Bookmarks Automatically for Navigating Errors/Warnings with customizable icons
  • Support Go To Position in a Log by result_file_regex
  • Search a Base Directory Automatically for Relative Path Link
  • Summary Output Panel
  • Auto Refresh for Multiple Logs
  • Continuous Tracking for Multiple Logs
  • Enable Build Window (Output Panel)

Customizable Syntax & Color Scheme

After changing syntax and color scheme in Log Highlight.sublime-settings, run Log Hightlight: Generate Custom Syntax & Theme command. You may have to restart sublime text once.

Extensible Severity Levels

You can add, remove, change severity levels like debug/notice/emergency in Log Highlight.sublime-settings, run Log Hightlight: Generate Custom Syntax & Theme command. You may have to restart sublime text once.

Separate Log Types

You can set the log type in settings
. “compile” type : link / summary / bookmark can be activated
. “system” type : color-highlight only (fast)

Bookmarks

When errors/warnings found, it will add bookmarks for them for each icon. The bookmark navigation is enabled(restored) from v1.8.0. You can use bookmark keys like F2.

Go To Position

By double-click, you can go to positions of links like "../../abc.cpp", 32 or ./abc.v line 234 in a log. For relative path, it may automatically search a base directory near the log file

Summary Output Panel

By default, it summarizes error/warning list in a new output panel at the bottom of window. It is useful to debug without monitoring the log file directly. But do not close the log file, it is needed to get the event. (default keymap - toggle : alt+f12, hide : ESC)

More Flexible Style Syntax

You can highlight links and quotes inside “begin regex”, “end regex” and “match regex” by using special words {{{LINK}}}, {{{QUOTE}}}. It can be used for the following gcc style error/warning message : ./src/abc.cpp:40:2 error: unknown escape seque ...

Auto Refresh for Multiple Logs

When the log files are updated, it automatically refreshes the bookmarks, summary output panel. There's some inertial delays for smooth action.

Continuous Tracking for Multiple Logs

If there are open files which already log-highlighted when sublime text restart, it will track all again. (ST3 only)

Enable Build Window (Output Panel)

Log Highlight can be used for Build Window or Unsaved View. But relative path link won't be used because the absolute path is unknown. In order to use relative path, you should set like the following: output_view.settings().set('filepath', [PATH]) output_view is the handle of your output panel view.

Settings

Please, refer to Log Highlight.sublime-settings, Available Icons : Icon List

  • Regular Expression Pattern in Settings

Usage : [ "begin regex", "end regex" ] or [ "match regex", "" ]
Caution : avoid OR '|' and separate them, it can make an unexpected result.

example)

Error-[SE] Syntax error :
   ./src/macros/uvm_object_defines.svh line: 764: token is 'for'
--> [ "^Error-\\[", "^\\s*[\\n]" ] // Error-[ ~ next empty line (multi-line)

error ../src/foo.cpp:40
--> [ "^(?i)error", "[\\r\\n]" ] // single line

../src/foo.cpp:40 error:
--> [ "^{{{LINK}}}?[^\\r\\n]*?(?i)error", "[\\r\\n]" ] // single line
  • Restore Settings

Use Log Hightlight: Erase Custom Syntax & Theme in the command palette Or
Just remove Packages/User/Log Highlight.tmLanguage, Log Highlight.hidden-tmTheme

Donate

Doate Image
Thank you for donating. It is helpful to continue to improve the plug-in.

Issues

When you have an issue, tell me through https://github.com/poucotm/Log-Highlight/issues, or send me an e-mail poucotm@gmail.com