Giter Club home page Giter Club logo

log-highlight's Introduction

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 (summary panel is deprecated))
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"
  • Support multiple kinds of logs with different options, severity levels, theme colors
  • 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
  • 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 Highlight: 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 Highlight: 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 / bookmark can be activated
. "system" type : color-highlight only (fast)

Support multiple kinds of logs

You can set multiple kinds of logs with different log extension.

Bookmarks

When errors/warnings found, it will add bookmarks for them for each icon. 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

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 Highlight: Erase Syntax & Theme in the command palette Or
Just remove Packages/User/Log Highlight

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 [email protected]

log-highlight's People

Contributors

poucotm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

log-highlight's Issues

setting user didn't work

i copy the whole setting-default to setting-user,and changed every color,but it didn't work.it seems that this package always load default-setting.

Sublime build 3207

Mac OS High Sierra 10.13

my setting-user file:

{
"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"  : "#3b4fff", // error message
			"link"  : "#3b4fff", // link in error message
			"quote" : "#3b4fff"  // 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"  : "#3b4fff", // warning message
			"link"  : "#3b4fff", // link in warning message
			"quote" : "#3b4fff"  // 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"  : "#3b4fff", // info message
			"link"  : "#3b4fff", // link in info message
			"quote" : "#3b4fff"  // quote in info message
		},
		"icon"  : "Danish Royalty/info.png"    // remove "icon" not to use icon, "dot", "circle" "bookmark" are possible
	}
}

}

Unable to find base directory

I installed the package, select the log. When I try to use I get error "unable to find base directory". what am I doing wrong?

Debugging issues with over-greedy regexes

First off: this looks like a very useful package. Thank you for writing it!

I've started to modify the severity levels, and I'm having trouble getting it to put only the lines I want in the summary window. Below is a sample of a log file, and my config. Are my regexes incorrect somehow, or is the "summary" setting not being obeyed?

My expectation is to have the WARN and ERROR lines appear in the summary, with none of the INFO lines. But some of the INFO lines are showing up. When I turn on "summary" for INFO, they all show up, with an extra line after the red ERROR line, but they are not counted in the summary at the top.

Suggestions?

A comment following the "enable" and "summary" lines in the default settings describing what exactly they do would be nice as well.

Thank you,
John

CameraMapper INFO: Loading exposure registry from /data/validate/hsc-reprocess/registry.sqlite3
CameraMapper INFO: Loading calib registry from /data/validate/validation_data_hsc/CALIB/calibRegistry.sqlite3
CameraMapper INFO: Loading calib registry from /data/validate/validation_data_hsc/CALIB/calibRegistry.sqlite3
jointcal.PhotometryFit WARN: FittedStar with 1 measuredStar and no refStar found as an outlier: x: -0.75442 y: 0.244364 flux: -7.58438e-07 fluxErr: 2.21969e-10 mcount: 1
jointcal.PhotometryFit WARN: FittedStar with 1 measuredStar and no refStar found as an outlier: x: 0.752806 y: 0.218323 flux: -1.14229e-07 fluxErr: 3.36851e-10 mcount: 1
jointcal.PhotometryFit WARN: FittedStar with 1 measuredStar and no refStar found as an outlier: x: 0.664753 y: 0.539066 flux: 2.51071e-06 fluxErr: 3.45118e-10 mcount: 1
jointcal.PhotometryFit WARN: FittedStar with 1 measuredStar and no refStar found as an outlier: x: -0.164897 y: 0.900303 flux: 5.4239e-07 fluxErr: 2.58476e-10 mcount: 1
jointcal.PhotometryFit INFO: findOutliers: found 4 meas outliers and 0 ref outliers 
jointcal.PhotometryFit WARN: chi2 went up, skipping outlier rejection loop
jointcal.PhotometryFit INFO: Total number of outliers 12
jointcal INFO: chi2/ndof : 9.80018e+11/91482=1.07127e+07
jointcal WARN: still some ouliers but chi2 increases - retry
jointcal INFO: Updating PhotoCalib for visit: 903982, ccd: 86
jointcal INFO: Updating PhotoCalib for visit: 903982, ccd: 20
jointcal INFO: Updating PhotoCalib for visit: 903982, ccd: 57
jointcal INFO: Updating PhotoCalib for visit: 903982, ccd: 9
jointcal ERROR: photometry failed to converge after 20 steps
jointcal INFO: Updating PhotoCalib for visit: 903982, ccd: 17
jointcal INFO: Updating PhotoCalib for visit: 903982, ccd: 86
jointcal INFO: Updating PhotoCalib for visit: 903982, ccd: 20
jointcal INFO: Updating PhotoCalib for visit: 903982, ccd: 57
jointcal INFO: Updating PhotoCalib for visit: 903982, ccd: 9
{
    "log_type": "compile",

    "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 -->
                [ "^.*ERROR:", "[\\r\\n]" ]                    // LSST ERROR (single line)
            ],
            "color" : {
                "base"  : "#FF4030", // 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 -->
                [ "^.*WARN:", "[\\r\\n]" ]                    // LSST WARN (single line)
            ],
            "color" : {
                "base"  : "#5080f0", // 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"  : true,
            "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 -->
                [ "^.*INFO:", "[\\r\\n]" ]                    // LSST INFO: (single line)
            ],
            "color" : {
                "base"  : "#859984", // info message
                "link"  : "#b36915", // link in info message
                "quote" : "#428a99"  // quote in info message
            },
            "icon"  : "dot"    // remove "icon" not to use icon, "dot", "circle" "bookmark" are possible
        },
        // <-- Remove, Change, Add More Severity Level Here -->
        "debug" : {
            "enable"  : true,
            "summary" : false,
            "pattern" : [
                // [ "begin regex", "end regex" ] or [ "match regex", "" ]
                [ "^.*DEBUG:", "[\\r\\n]" ],                // LSST DEBUG: (single line)
                // <-- Remove, Change, Add More Patterns Here -->
            ],
            "color" : {
                "base"  : "#70991f", // debug message
                "link"  : "#b36915", // link in debug message
                "quote" : "#428a99"  // quote in debug message
            },
            "icon"  : "Koloria/help.png"    // remove "icon" not to use icon, "dot", "circle" "bookmark" are possible
        },

    }
}

Need some help with some usage way

Thanks to the author, this is an excellent plugin, but I have encountered several problems, hope someone can help me.

❓1. Plugin trigger way

The plugin will only work when the theme is set to the highlight option. When Triggering the log highlight in the right-click menu of the log file does not respond. The console log shown as below, Is there a problem with my usage?
pplog
Actually, it only works when I use the global color schema setting like this:
pp-log-trigger

✔ It works so far this way.
work

🙈 2. The rule to write matching rules

Another problem is my current log file rules as:

[D] means debug, [I] means info level, [W] means warning, [E] means error
2023-05-19 21:48:46.993 [E] [L:327-main()] ====== #1 Cut for DEMO-base12-2 from 00:00:01 to 00:00:42, idx: #1, duration: 0min41s. 
2023-05-19 21:48:47.136 [W] [L:217-grep_for_key_and_before()] Grep pts, from 1(s) to 3(s) 
2023-05-19 21:48:49.148 [W] [L:240-grep_for_key_and_before()] From 1(s) to 3(s), got K_FRAME: 2.035000, BEF_KEY_FRAME: 2.002267 
2023-05-19 21:48:49.385 [E] [L:254-grep_for_key_and_before()] Grep 1(s) nearby result: 2.035000(K_FRAME) / 2.002267(BEF_KEY_FRAME) 

When I refer to the Log Highlight.sublime-settings file, what confuses me is how to modify the regularity of the configuration file for my log example?
I want [E] to match the error case and [W] to match the warning case.
In other words, how to modify the following configuration

...
"error" : { // specify name as yours
"enable"  : true,
"pattern" : [ // [ "begin regex", "end regex" ] or [ "match regex", "" ]
	// examples
	[ "^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'
	["^{{{LINK}}}?[^\\r\\n]*?([Ee][Rr][Rr]?|\\[e\\])", "[\\r\\n]"],
	[ "^\\w+:\\s*\\*E", "[\\r\\n]" ]                     // ...: *E ... (single line)
	// <-- remove, change, add more patterns here -->
],
...

If you have any suggestions, please tell me :)🧡

No auto highlight and no summary

Hello.

I reinstalled windows. So I reinstalled ST3 and your awesome plugin. But it doesn't auto highlight and doesn't show summary like it used to =( I didn't change any settings

capture groups coloring?

I thought I would be able to color by capture group, but it seems it only has quotes and url which I assume is hard coded? why not add these as capture groups in the regex?

how would I color code key value pairs? I see how I can color the whole line, or half. but not both. Am i wrong?

Mode: STA
PHY mode: N
Channel: 1
AP id: 0
Status: 1

also could use lookaheads to leave delimiters as default color or something else, hmm

Add behavior to double click

Now when double click a line in summary panel, it will go to link position. I hope you can add a feature that:

  • when double click just on the link string, such as "../../abc.cpp, 32" or "./abc.v line 234", you will go to link position.
  • when double click outside link string but still on current line in summary panel, you will go to related log file line.

Thanks.

Generate syntax with random result

Hello,

I recently wondered why little changes (like a simple color change) to my settings very often result in Log-Highlight not working as expected.
Workflow: change user settings -> generate syntax -> close ST3 -> open ST3 -> apply Log-Highlighting
Now I made several consecutive "generate syntax" while leaving the settings file identical.
Big surprise: tmTheme is generated completely different (see attachment, all files generated from also attached settings file!?). In the working version, there is proper line formatting, while it is missing in the non-working tmTheme. Instead there are several commented lines there which do not appear in the working version.
settings.zip

I am working on Win10, ST3.2.2, Build3211, Log-Highlight 2.0.9

Update:
It seems that the tmTheme is updated when ST3/LogHighlight first matches a file with the respective extension pattern of this log-highlight profile when the file is opened. After this, the tmTheme changed to the working version.
Instead, when the file to highlight is already open and "Select syntax ...hnf" or just "highlight" is issued, the tmTheme does not get updated/corrected.
The initial (not working) version is easily identifiable by the second line:
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
In the corrected version this line is changed to
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

Read latest errors on refresh

Hi,

I'm loving this package! So I feel I have to apologise for the following question;

  • How can I make sure to view the latest errors (usually at the bottom of the log file) on auto-refresh?
    Am I using it the wrong way? I cannot find any info on this topic...which make me suspect it's basic common knowledge ;)

  • Also, Is there a way to change the linking format, so it catches my custom format:
    /some/path/class-ps-booking-controller.php on line 11

Broken relative path with current version v1.8.7

Hi,
Same issue as before (#10), seems to came back in version v1.8.7
When I parse and open log file with relative path like :
../../../ast/src/drivers/src_unit/man/TU_data_man.cpp:1091: failed: ...
instead of opening TU_data_man.cpp, it open a new empty file without taking car of ../../../ and I get this in the console :
File "Log Highlight in \Sublime Text 3\Installed Packages\Log Highlight.sublime-package", line 850, in search_base
File "./python3.3/ntpath.py", line 113, in join
File "./python3.3/ntpath.py", line 162, in splitdrive
TypeError: object of type 'NoneType' has no len()

Thank you by advance for investigating this regression.

Nothing working, context menu doesn't work

I cannot get anything to work the way it was before update.

Right click context Log highlight does nothing, changing syntax to Log highlight also does nothing.

Screen Shot 2020-10-17 at 11 59 26 AM

I have replaced settings with new default, I have rebuilt syntax,colors

config broken after update

hello,

Sublime installed the latest Version 2.0.7 of your Addon and now my Script no longer works.

What can I do to fix this?
Do I need to change anything in my configfile after the updates?
If I see it correctly, it seems to use the standard predefined configfile now.

While we're at it, can you also give me an example how I can define multiple configs for different extensions now, which you added with one of the last updates?

Thanks.

Custom Syntax not dysplaying selected color

Hello,
Great Package!
I have the following issue: I am trying to highlight some specific keywords in my log. I have created a debug entry and selected the colors and icons.
The icon is displayed, and the Summary show the line that matches the expression, but doe not matter what I do, the Log does not show in the color selected ( as in errors).

	// debug ___________________________________________________
	"debug" : {
		"enable"  : true,
		"summary" : true,
		"pattern" : [
			// [ "begin regex", "end regex" ] or [ "match regex", "" ]

			[ "^{{{LINK}}}?[^\\r\\n]*?(?i)onMessageReceived:",""], 	// a line including case-insensitive 'onMessageReceived'
			[ "^{{{LINK}}}?[^\\r\\n]*?(?i)wakeup", "" ],            // wakeup ... (single line)
			[ "^{{{LINK}}}?[^\\r\\n]*?(?i)Tap/Button", "" ],
			[ "^{{{LINK}}}?[^\\r\\n]*?(?i)isCallActivityVisible", "" ]
			// <-- Remove, Change, Add More Patterns Here -->
		],
		"color" : {
			"base"  : "#F94823", // debug message
			"link"  : "#23F9E5", // link in info message
			"quote" : "#F923CB "  // quote in info message
		},
		"icon"  : "Blueberry/bonus.png"    // remove "icon" not to use icon, "dot", "circle" "bookmark" are possible
	}

Example log 2019-10-16_16-01-23

Define new pattern set

Hi Poucotm,

Firstly, such an awesome package!
I wonder can I define a new pattern set, for example:
"info_pattern": [
[ "\[INFO\]", "\n" ],
],

and then choose the color for this type of pattern set?
Also, in some big log file, the "Bookmarks" and "Go To Position" make sublime very lag. Can I have an option to turn off these feature for big log file?

Thanks very much!
Giap

Wildcards no longer working for extension

Hi,

It seems wildcards are no longer working for specifying extensions since v2.0.0.

I would like to have the option to have something like:
"extension" : [ "messages.*" ],

P.S.: Sometimes there are generated filenames, so it's important to have and it's not just about covering the log rotation: messages.1, messages.2, etc.

Highliting git output.

Is it possible to highlight git output in sublime panel? It is standart Git plugin from package control.
Screenshot_1

Ignoring user settings

Hi,
Log Highlight seems to be ignoring user settings (system info below). No matter what settings I add to the user settings file, when I run Log Hightlight: Generate Custom Syntax & Theme and Log Highlight : Highlight Error/Warning, it always highlights based on the defaults.

System info:
Sublime version: ST3 stable 3126
OS: OS X El Capitan (10.11.6)

Check that, I missed that it needed to be an array of [start_regex, end_regex].

Disable double click to open link

Is possible to disable the double click to open link. In many log files types there's no such links and I use to double click to select full words for copy and paste.

May be a new setting can be added to disable this feature.

Greets.

Not highlighting regex match more than 16384 characters in a line

When a single line has characters more that 16384, highlight doesn't work. As soon as we add a line break after 16384, line is highlighted. Icon for the match line is shown though, every-time.

Following example is used:

"severity" :
			{
				"result" : { // specify name as yours
					"enable"  : true,
					"pattern" : [ // [ "begin regex", "end regex" ] or [ "match regex", "" ]
						// examples
						[ "^INFO: RES:", "" ]
					],
					"color" : { // ["foreground", "background"]
						"base"  : ["#F92666", ""], // error message
						"link"  : ["#E6DB74", ""], // link in error message
						"quote" : ["#4F99D3", ""], // quote in error message
					},
					"icon"  : "Koloria/check.png", // remove "icon" not to use icon, "dot", "circle" "bookmark" are possible
				}
			},

More log level ?

Hi,

This plugin seems great but I can't find how to add other level to color notice/debug/alert/emergency logs (whose are unix syslog levels)
Is there any way to do this ?

Maybe it could be nice to have a map to define levels instead of error_enable and error_pattern... and be able to define color at the same location

{
  "error": {
    "enable": true,
    "pattern": [ ... ],
    "color" : {
        "base": "#FF0000"
        "link": "#FF0000"
        "quote": "#0000FF"
     },
    "quote_pattern": ["[^\\"]+"], ["'[^']+'"] ["`.*'"]
  }
}

unable to change color for info

I want to change info color to yello , not red , I did the following steps:

  1. change log highlight settings.
    change base color to yello

  2. execute generate custom sytax and theme command

  3. reboot sublime

but no lucky. by the way I also need to mark the line

[2018-03-29 11:24:20] php.INFO: User Deprecated: The "sylius.payum_action.offline.convert_payment" service is private, checking for its existence is deprecated since Symfony 3.2 and will fail in 4.0. {"exception":"[object] (ErrorException(code: 0): User Deprecated: The \"sylius.payum_action.offline.convert_payment\" service is private, checking for its existence is deprecated since Symfony 3.2 and will fail in 4.0. at vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php:224)"} []

as blue, what is the correct regex?

before

		"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
		}

after

"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"  : "#ECFF00", //  yello 
				"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
		}

Incomplete link highlighting

I'm not sure why the problem occurs.

Line 897 (260 characters): (Incomplete highlighting - 74 chars blue, missing 7 chars)
Line 898 (232 characters): (Incomplete highlighting - 69 chars blue, missing 10 chars)
Line 904 (232 characters): (Complete highlighting - 79 chars blue)
Line 909 (255 characters): (Complete highlighting - 79 chars blue)
Line 912 (238 characters): (Not highlighted at all - Absolute path exists)

issue

Any solution?

Does not install completely

When using the package manager to install, the menu items is installed as it is selectable; however the package directory is never made. Downloading the package and placing it into the packages directory and insuring that the name is correct (remove hyphen from downloaded package), the log receives highlighting. Even though this is a +, the features -- like double clicking on links -- does not work. There is no pane (ctrl+12). It just doesn't work.

I have tried it on the latest released (licensed) and the latest beta build -- both have the same results.

From the console:
reloading plugin Log Highlight.Log Highlight

From Build:
Creating a error in the code;
from ..utils import indexable, check_random_state, safe_indexing
ValueError: attempted relative import beyond top-level package <<<---- this is colored red now

Turning on sublime logging:
File "C:\Users\user1\AppData\Roaming\Sublime Text 3\Packages\Log Highlight\Log Highlight.py", line 410, in on_activated_async
if not view.settings().get('syntax').endswith('Log Highlight.tmLanguage'):
AttributeError: 'NoneType' object has no attribute 'endswith'

System:
Windows 10
Running as unprivileged user
Anaconda (latest)
Licensed Sublime Text 3 (beta installed currently, does not work on public release)

Change highlighted text background color

Hi,

I would like to have red background color for the highlighted errors instead of coloring the font itself, so it becomes even more visible when scrolling through thousands of lines.
Is it possible to configure the text background color somehow?

Option to use sublime theme

Using auto-dark to change to dark mode automatically, but when dark mode is activated, log file tab still has white background.
I guess the theme settings overwrite sublime's theme.

Tried to use an empty theme block setting, but doesn't work.

icons are not always shown

hello,

I love your Addon :)

I have the problem, that the icons are not shown, when I use the Loghighlight-Button from the rightclickmenu of sublime.
The text is parsed fine, but the Icons only appear after I generate the Custom Syntax and Theme.

I just changed something in the config, now the icons show for some reason (I could not determine yet what makes them show and what doesn't), but the part I added shows no icon.
The text is parsed and colored correctly though.

To show the Icons, I sometimes randomly regenerate the Syntax and click to other tabs and change the config and sometimes it works then.
I am using Sublime Text 3.2.2 Build 3211 on Linux Mint 19.1

Edit:
I have set autohighlight to false and always use the button manually and "system" as logtype.

Also a not related request: Can the parsing times be improved? For long files it takes sometiems 20 seconds to parse them.

Create project config option to specify base path

Due to the set up of my development environment, I can't change the PHP error log to be in the same directory as my base path.

Can you please allow for manual setting of a base path in the sublime project settings, so that my links can work?

Set different Severy Levels/ Highlight for different Filetypes

Hello,

can you implement, that I can add different highlights/severity levels for different files or different file types?
Or this already possible somhow?
Couldn't find anything about it.

Sure, I can set *.extension, but I would like to set different filetypes, or different full-filenames for different defined severity levels.

Thanks, love your Mod so far!

Log-Highlight does not work

I have a Macbook Pro with a fresh install of Sublime Text 3. I used Package Control to install log highlight. I've opened log files and tried to apply the Log Highlight syntax via the context menu and via the command palette. It does not highlight errors in red. It does not provide the window at the bottom of the screen with a summary of all errors. I don't see any indication that it is working at all. It was working for me a few months ago but it isn't anymore. Any suggestions?

Sometimes I get the following in the console:

LOG HIGHLIGHT : ERROR _______________________________________
Traceback (most recent call last):
File "/Users/mikemoose/Library/Application Support/Sublime Text 3/Installed Packages/Log Highlight.sublime-package/Log Highlight.py", line 649, in run
self.run_imp()
File "/Users/mikemoose/Library/Application Support/Sublime Text 3/Installed Packages/Log Highlight.sublime-package/Log Highlight.py", line 688, in run_imp
set_syntax_theme(self.view, lname)
File "/Users/mikemoose/Library/Application Support/Sublime Text 3/Installed Packages/Log Highlight.sublime-package/Log Highlight.py", line 194, in set_syntax_theme
tree = plistlib.readPlist(ctheme)
File "./python3.3/plistlib.py", line 73, in readPlist
FileNotFoundError: [Errno 2] No such file or directory: '/Users/mikemoose/Library/Application Support/Sublime Text 3/Packages/Log Highlight/Log Highlight.tmTheme'

add log settings for some famous projects.

It is not easy for beginner to add custom settings for their project , please add a repo what we can contribute log settings for some famous projects, so other beginners can quickly pick it up, no need to know how to customize unless it is necessary.

Feature req colored icons

It would be nice if the circle dots were colored to base or custom color[n] , fallback to a theme_color attribute etc.

Like how git gutter looks

Error - No such file or directory: .../Packages/Log Highlight/...

I've tried un/reinstalling Log Highlight a few times through the Package Manager (Sublime 3.2.2 3211) and when I try to apply "Log Highlight" (via the context menu or Command Palette) nothing happens and I get this error in the console:

LOG HIGHLIGHT : ERROR _______________________________________
Traceback (most recent call last):
  File "C:\Users\Matt\AppData\Roaming\Sublime Text 3\Installed Packages\Log Highlight.sublime-package\Log Highlight.py", line 653, in run
    self.run_imp()
  File "C:\Users\Matt\AppData\Roaming\Sublime Text 3\Installed Packages\Log Highlight.sublime-package\Log Highlight.py", line 692, in run_imp
    set_syntax_theme(self.view, lname)
  File "C:\Users\Matt\AppData\Roaming\Sublime Text 3\Installed Packages\Log Highlight.sublime-package\Log Highlight.py", line 198, in set_syntax_theme
    tree = plistlib.readPlist(ctheme)
  File "./python3.3/plistlib.py", line 73, in readPlist
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Matt\\AppData\\Roaming\\Sublime Text 3\\Packages\\Log Highlight/Log Highlight.tmTheme'
=============================================================

Indeed, the %AppData%/Roaming/Sublime Text 3/Packages/Log Highlight directory doesn't even exist, and never seems to be created.

This is the log during installation:

ignored packages updated to: ["Log Highlight", "Vintage"]
reloading settings Packages/User/Package Control.sublime-settings
reloading settings Packages/User/Preferences.sublime-settings
Package Control: Error parsing messages.json for Log Highlight
reloading settings Packages/User/Package Control.sublime-settings
ignored packages updated to: ["Vintage"]
reloading plugin Log Highlight.Log Highlight
Traceback (most recent call last):
  File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 196, in load_module
    m.plugin_loaded()
  File "C:\Users\Matt\AppData\Roaming\Sublime Text 3\Installed Packages\Log Highlight.sublime-package\Log Highlight.py", line 49, in plugin_loaded
    get_log_extension()
  File "C:\Users\Matt\AppData\Roaming\Sublime Text 3\Installed Packages\Log Highlight.sublime-package\Log Highlight.py", line 78, in get_log_extension
    lgl = list(lol.keys())
AttributeError: 'NoneType' object has no attribute 'keys'
reloading settings Packages/Log Highlight/Log Highlight.sublime-settings
generating syntax summary
Traceback (most recent call last):
  File "C:\Users\Matt\AppData\Roaming\Sublime Text 3\Installed Packages\Log Highlight.sublime-package\Log Highlight.py", line 49, in plugin_loaded
TypeError: 'NoneType' object is not callable
reloading settings Packages/User/Package Control.sublime-settings
reloading settings Packages/User/Preferences.sublime-settings

If I manually create the Log Highlight directory and add the Log Highlight.tmTheme file to it, I can get it to run without the error. But I manually have to edit that file for the changes to be reflected, editing the Log Highlight.sublime-settings for the User doesn't do anything.

Removing from the Package Manager does correctly delete the manually-created %AppData%/Roaming/Sublime Text 3/Packages/Log Highlight directory.

Any ideas? Thanks!

Broken relative path with last version v1.8.3

With previous versions, I had no problem to parse successfully and open log file with relative path like :
../../../ast/src/drivers/src_unit/man/TU_data_man.cpp:1091: failed: ...
With the last week update, instead of opening TU_data_man.cpp, it open a new empty file without taking car of ../../../ and I get this in the console :
File "Log Highlight in \Sublime Text 3\Installed Packages\Log Highlight.sublime-package", line 851, in search_base
File "./python3.3/ntpath.py", line 111, in join
File "./python3.3/ntpath.py", line 162, in splitdrive
TypeError: object of type 'NoneType' has no len()

Thanks by advance to investigate this regression.

log jumping to top with every change.

While keeping the log file opened, the view jumps to top of the log with every change. In my case debugging a PHP website, so with every page reload.

Is there any way of adding a script to jump back to the end after reload?

[Feature request] SublimeTail support

Summary

It would be nice, if you add SublimeTail support.

Expected behavior

Highlight SublimeTail logs.

Actual behavior

If tab with Tail was opened for me, Ctrl+Shift+PLogHighlight: Highlight Error/WarningEnter → Tail log not highlight for me, I get message in status bar:

Unknown name for current view

Steps to reproduce

I install SublimeTail → I open log file → Tail: Tail File In New View → Tail tab open for me.

Tail Tab

I change log file → I see changes in Tail tab. If I try highlight log in Tail tab, I get actual behavior.

Not helped

My User\Log Highlight.sublime-settings file:

{
    "log_ext": [ ".log", "Tail" ],
}

But I still get actual behavior.

Thanks.

Log Highlight causing problems with Goto Anything

When I try to open a file with Goto Anything... with Log Highlight installed and there is a file matching the log regex (in my case, just *.log) at the top of the list, Goto Anything immediately closes (without opening anything) and this error shows up on the SublimeText console:

=============================================================
LOG HIGHLIGHT : ERROR _______________________________________
Traceback (most recent call last):
  File "/Users/parejkoj/Library/Application Support/Sublime Text 3/Installed Packages/Log Highlight.sublime-package/Log Highlight.py", line 269, in fread
    with open(fname, "r") as f:
TypeError: invalid file: None
=============================================================

I tried updating my config to reflect the new sublime-settings format, and also just removing all the "Log Highlight" files I could find in my Sublime/Packages directory after removing the Log Highlight and then reinstalling it, and restarting SublimeText but this is still occurring.

I can still directly open log files with File->Open or using the subl commandline.

Map server path to client path

I'm running a development server within a Vagrant VM.
Clicking the blow link will take me to a directory that does not exist on my local client, but within the VM.

[31-Mar-2018 19:09:41 UTC] PHP Notice: Undefined property: stdClass::$plugin in /srv/www/example/htdocs/wp-includes/class-wp-list-util.php on line 150

It would be great to be able to map these remote paths to my local dev directory.

"path_mapping": {
       "/srv/www/example" : "/Users/jan/vvv/www/example"
}

Ignore option

Hello, great plugin! I wonder is there some way to add lines to ignore all rules? Fo example I have "ConnectivityService" spaming in log and that lines contains some words that I use to make summary. It's gonna be great have ignore rules

No icons

Hello,

I configured the use of icons, but it does not show any icons in sublime.
Highlighting the Lines works fine.

I tried everything: icon, dot and circle all dont show any icons.
I tried Danish Royalty/warning.png and Danish Royalty/error.png as well as no image at all.

Somehow I was able to see Icons some time ago once, but I dont remember doing anything specific to enable them.

Using LogHighlight 1.8.5 and Sublime 3.0, build 3143 on a Linux Mint 18.1 Cinnamon and Kernel 4.4.0-104

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.