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 4K
  • Win 2K
  • OS X 1K
  • Linux 640
Jul 21 Jul 20 Jul 19 Jul 18 Jul 17 Jul 16 Jul 15 Jul 14 Jul 13 Jul 12 Jul 11 Jul 10 Jul 9 Jul 8 Jul 7 Jul 6 Jul 5 Jul 4 Jul 3 Jul 2 Jul 1 Jun 30 Jun 29 Jun 28 Jun 27 Jun 26 Jun 25 Jun 24 Jun 23 Jun 22 Jun 21 Jun 20 Jun 19 Jun 18 Jun 17 Jun 16 Jun 15 Jun 14 Jun 13 Jun 12 Jun 11 Jun 10 Jun 9 Jun 8 Jun 7 Jun 6
Windows 4 5 6 14 5 4 3 5 9 7 8 9 4 7 8 11 12 6 6 2 5 5 7 11 12 8 2 0 4 7 9 21 10 0 1 13 16 14 10 6 10 2 9 6 7 10
OS X 8 8 5 1 5 1 3 2 6 4 5 6 1 1 6 2 8 4 5 1 2 4 7 4 6 8 2 1 7 8 3 9 8 1 1 4 9 5 5 7 0 0 7 4 3 4
Linux 5 4 4 4 3 1 2 3 2 6 1 2 2 1 1 3 4 1 5 3 1 4 0 0 4 3 0 1 2 2 3 2 4 0 0 1 0 4 1 0 0 1 1 1 3 2

Readme

Source
raw.​githubusercontent.​com

Log Highlight for Sublime Text

Package Control

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

(Build Window)

Image of Log Highlight

(Log File)

Image of Log Highlight

Features


  • Customizable Syntax & Color Scheme
  • Extensible Severity Levels
  • 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 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 settings, run Log Hightlight: Generate Custom Syntax & Theme command. You may have to restart sublime text once.

Bookmarks

When errors/warnings found, it will add bookmarks for them for each icon.

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.

Restore Settings :

Just remove Packages/User/Log Highlight.tmLanguage, Log Highlight.hidden-tmTheme

Pattern Regular Expression 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

Settings :

icon list : https://github.com/poucotm/Log-Highlight/tree/master/icons

{
   // enable context menu
   "context_menu": true,

   // Auto Highlight for a log file, build window
   "auto_highlight" : true,

   // log file extension
   "log_ext": [ ".log" ], // use ".*" for all file extensions - but can not use `Auto Highlight`

   // use clickable link or not
   "use_link": true,

   // search base directory automatically for relative path
   "search_base": true,

   // severity level
   "severity" : {

      // error __________________________________________________
      "error" : {
         "enable"  : true,
         "summary" : true,
         "pattern" : [
            // [ "begin regex", "end regex" ] or [ "match regex", "" ]
            [ "^Error-\\[", "^\\s*[\\n]" ],                      // Error-[ ~ next empty line (multi-line)
            [ "^{{{LINK}}}?[^\\r\\n]*?(?i)error", "[\\r\\n]" ],  // a line including case-insensitive 'error' with or without a link in front of 'error'
            [ "^\\w+:\\s*\\*E", "[\\r\\n]" ]                     // ...: *E ... (single line)
            // <-- Remove, Change, Add More Patterns Here -->
         ],
         "color" : {
            "base"  : "#F92672", // error message
            "link"  : "#E6DB74", // link in error message
            "quote" : "#4F99D3"  // quote in error message
         },
         "icon"  : "Danish Royalty/error.png"   // remove "icon" not to use icon, "dot", "circle" "bookmark" are possible
      },

      // warning ________________________________________________
      "warning" : {
         "enable"  : true,
         "summary" : true,
         "pattern" : [
            // [ "begin regex", "end regex" ] or [ "match regex", "" ]
            [ "^Warning-\\[", "^\\s*[\\n]" ],                    // Warning-[ ~ next empty line (multi-line)
            [ "^{{{LINK}}}?[^\\r\\n]*?(?i)warning", "[\\r\\n]" ],// a line including case-insensitive 'warning' with or without a link in front of 'warning'
            [ "^\\w+:\\s*\\*W", "[\\r\\n]" ]                     // ...: *W ... (single line)
            // <-- Remove, Change, Add More Patterns Here -->
         ],
         "color" : {
            "base"  : "#A1B347", // warning message
            "link"  : "#FD971F", // link in warning message
            "quote" : "#4F99D3"  // quote in warning message
         },
         "icon"  : "Danish Royalty/warning.png" // remove "icon" not to use icon, "dot", "circle" "bookmark" are possible
      },

      // info ___________________________________________________
      "info" : {
         "enable"  : false,
         "summary" : false,
         "pattern" : [
            // [ "begin regex", "end regex" ] or [ "match regex", "" ]
            [ "^Information-\\[", "^\\s*[\\n]" ],                // Information-[ ~ next empty line (multi-line)
            [ "^\\[INFO\\]", "[\\r\\n]" ]                        // [INFO] ... (single line)
            // <-- Remove, Change, Add More Patterns Here -->
         ],
         "color" : {
            "base"  : "#70991f", // info message
            "link"  : "#b36915", // link in info message
            "quote" : "#428a99"  // quote in info message
         },
         "icon"  : "Danish Royalty/info.png"    // remove "icon" not to use icon, "dot", "circle" "bookmark" are possible
      }

      // <-- Remove, Change, Add More Severity Level Here -->
   },

   // theme color set
   "theme_color": {
      "background"      : "#13181F",
      "foreground"      : "#D7D7D7",
      "caret"           : "#F29718",
      "selection"       : "#3A5166",
      "selectionBorder" : "#181E26",
      "lineHighlight"   : "#283240",
      "summary_title"   : "#D7D7D7"
   },

   // summary panel
   "summary_panel": true,         // show summary panel

   // bookmark
   "bookmark_enable": true,       // enable/disable bookmarks
   "bookmark_goto_error": true    // automatically go to 1st error line
}

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, yongchan.jeon@samsung.com