Git Product home page Git Product logo

vscode-logfile-highlighter's People

Contributors

boozook avatar dependabot-preview[bot] avatar dependabot[bot] avatar egamma avatar emilast avatar haaleo avatar leon99 avatar mjbvz avatar mul14 avatar shawnzhong avatar stellarpower 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  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  avatar  avatar  avatar  avatar  avatar

vscode-logfile-highlighter's Issues

Add new keyword in log level

Hello,
I do the entity framework and in the log when a sql request fails, the word "Failed" is used.
Would it be possible to add this word into the log level?
Thank you.

Uncolored tokens

Some colors never show, like the INFO / WARN / ERROR words.

It's probably not understanding info-token / warn-token / error-token anymore.

PS1: I tried all themes.
PS2: My log is generated by winston-logger for nodejs. But I also tried in your syntax.

Atom One Dark Theme:
Screenshot - Atom One Dark Theme

Base16 Ocean Dark Theme:
Screenshot - Base16 Ocean Dark Theme

constant flashing with long log file

when opened up a long log file (5000line). The log color is flashing between plain and colored. Short logs flash too but only for 2-3 times and it stops.

Version: 1.1.1

changed theme and turn off minimap won't help.

I have add

"files.associations": {
	"*.log.*": "log"
}

to setting

Do not provide syntax highlighting to the message

From VS Code #42517

VS Code uses the grammar from here, to syntax colour the log files. It is very nice, but the colouring sometimes appears random (see below). Is it possible to colour only the header but not the body of the message?

image

Issue - highlighting of GUIDs in log message

Awesome tool.

Unfortunately it cannot recognize GUID correctly. It colorizes only the parts that are completely number.

E.g. if the log line contains:
ParamId=70afd445-5948-4597-9951-373d336e1627
then the colorized parts are only (bold):
ParamId=70afd445-5948-4597-9951-373d336e1627
but it should be
ParamId=70afd445-5948-4597-9951-373d336e1627
or none.

Feature: Apply default color after custom pattern

Hi, Thank for the create great extension and custom highlight.
I would like to suggest feature to apply default highlight after custom highlight
Example
image
image

As you could see that the custom highlight is work perfectly but you could see the last digit 3 at the end is not highlight by the default color any more like the ones above it.

I would like to ask for either another entry in VSCode settings that would be painted before the default or attribute of custom patterns that for the same purpose

    "logFileHighlighter.customLowLevelPatterns": [
        {
            "pattern": "\\* START \\*.*",
            "foreground": "teal"
        }
    ]

or

    "logFileHighlighter.customPatterns": [
        {
            "pattern": "\\* START \\*.*",
            "foreground": "teal",
            "lowLevel": true
        }
    ]

expand time format of typical DOS TIME

I'm using VS Code, but not the extension.

Can the time format be expanded? (just a tiny bit)

DOS TIME (%TIME%) typically outputs (h| )h:mm:ss.ms. This is an example from echo %DATE% %TIME%-

07/03/2018  0:15:05.49-

There is a space in place of where the extra 0 for the hour should be.

If the time format could be expanded through the following change, I bet it would help others too.

\d{1,2}:\d{2}(:\d{2}([.,]\d{1,})?)?(Z| ?[+-]\d{2}:\d{2})?\b

Changes: 1 or 2 (instead of only 2) digits before the first ':', at least 1 (instead of at least 3) digits after a . or ,. (I have seen logs that only included 100ms resolution, ie hh:mm:ss.m)

Thanks.

Is this extension deprecated after VSCode 1.20.0 release?

It looks like your code was integrated to the VS Code 1.20.0 release:
"Now you can see VS Code logs with syntax highlighting in the Output panel. Thanks to emilast for providing the grammar for syntax highlighting log files."

Does that mean your extension is now deprecated? Or does it provide more?

Enhancement Request: Custom log levels

Hi, great extension, thanks for supporting it.

I'm using the NodeJS Winston logging tool and it has some additional logging levels.

It would be great to be able to be able to specify additional log levels and other string tokens. I would, for example, like to be able to colour "Verbose" or "VERBOSE" in green.

Not Working w/Insiders Version

I tried to install using Code Insiders version but received this error message:

Couldn't find a compatible version of Log File Highlighter with this version of Code.

Are there plans to make it compatible with the Insiders version?

Thanks,
Derek

Here is my version:
[Window Title]
Visual Studio Code - Insiders

[Main Instruction]
Visual Studio Code - Insiders

[Content]

Version 1.6.0-insider
Commit 602155bb781f509c7a4ddcd700b57cb9b9f5286d
Date 2016-10-01T00:36:55.469Z
Shell 1.3.7
Renderer 52.0.2743.82
Node 6.5.0

[OK]

tail follow or auto scroll option

Hi,

Great extension, I use this every day. Do you think it would be possible to add some functionality to follow a log as its being updated?

Perhaps this can be bound to a short cut to turn the follow on and off.

VS Code already auto updates the file as the log is being written to, the feature would basically keep the view scrolled to the bottom.

If there were some indication that the file had reloaded that would be fantastic too, perhaps a glyph in the gutter showing the last line when the tab was last active / last being viewed.

Add pattern for "Warning", "Info", "Error" for windows installation logs

We often face logs of windows upgrades or migrations which all have those "keys" for their outputs:

2018-02-05 14:44:48, Warning               MIG    Could not create object Microsoft-Windows-Update-Ux-MusScnHandlers[@version="10.0.15063.850" and @arch="amd64" and @culture="neutral" and @context="perUser"]/settings. Exception class Mig::SideAwareWin32Exception: The request is not supported. [0x00000032] void __cdecl Mig::CStateDataStore::Create(class Mig::CDataUnit *)
2018-02-05 14:44:48, Info                  MIG    Error 50 during apply of object Microsoft-Windows-Update-Ux-MusScnHandlers[@version="10.0.15063.850" and @arch="amd64" and @culture="neutral" and @context="perUser"]/settings. Will ask shell application for resolution.
2018-02-05 14:44:48, Warning               SP     Error WRITE, 0x00000032 while gathering/applying object: State, Microsoft-Windows-Update-Ux-MusScnHandlers[@version="10.0.15063.850" and @arch="amd64" and @culture="neutral" and @context="perUser"]/settings. Will return 2
2018-02-05 14:44:48, Info                  MIG    Error 50 while applying object Microsoft-Windows-Update-Ux-MusScnHandlers[@version="10.0.15063.850" and @arch="amd64" and @culture="neutral" and @context="perUser"]/settings. Shell application requested ignore
2018-02-05 13:36:39, Error                 CONX   Windows::Compat::Appraiser::WicaApplicationInventory::AddItemProperty (546):   App Inventory returned duplicate file d:\users\aha\appdata\local\temp\~nsu.tmp\cu_.exe.[gle=0x8007000d]
2018-02-05 13:36:39, Error                 CONX   Windows::Compat::Appraiser::WicaApplicationInventory::AddItemProperty (546):   App Inventory returned duplicate file c:\program files (x86)\microsoft visual studio\2017\professional\common7\ide\devenv.exe.[gle=0x8007000d]

Could you please add this?
TIA, Andi

Not seeing any formatting?

I have created a simple log interface as follows

2018-08-29 10:27:56 INFO Finish .test
2018-08-29 10:27:56 INFO Finish .lint:js-fix
2018-08-29 10:27:56 INFO Finish .lint:js
2018-08-29 10:27:56 INFO Finish .lint
2018-08-29 10:27:56 INFO Finish .test:unit
2018-08-29 10:27:56 INFO Finish .build

But when I view the log file in VSCode, it does not have formatting as it appears in your screenshots?

Is this because the date format is different?

Here is a screenshot of what I see

image

Must I need to configure the various colors myself, or are there sensible defaults (I am fine with the appearance of your screenshot)

Feature Request - Calculate Time duration on selected Text

It would be great, to have a feature to calculate the duration of the selected text...

Example:

I select this:
2016-11-25 12:03:50,659 WARN [org.pentaho.platform.web.http. ......
.....
....
2016-11-25 12:06:52,859 WARN [org.pentaho.platform.web.http. ......

Then the tool would show me in the status bar:
Selected: 3 Minutes, 2 Seconds, 200ms

This would be good for performance analysis.

So you have to search the first timestamp text at start of selection and the last one. Then calculate the difference and show it in the status bar.

Support for detecting time-only log records

Often daily logs are used, which means that it's not feasible to include the date for every record. Please support detecting of records that start with something like
09:20:00.390

Re using log text mate grammar inside VS Code

@emilast I am a developer from VS Code. In last release (1.19) we added support for logging in VS Code. As a result of this VS Code generates log files which will be shown in Output channel and also can be opened in the editor.

Now, we want to support syntax highlighting for these log files out of the box. I was looking for any existing syntax grammar for log files and I came across yours. So I would like to have following requests for you:

  1. Can we reuse your grammar files for highlighting log files? We will update whenever you have fixes or enhancements

  2. I see your extension is also doing the same. May I know if you are planning to add more functionalities to your extension other than highlighting? Not sure it is useful to have two things providing same feature.

Thanks

Extend support to include log.header and log.footer

I use these command often for "group" logging output. I would like to be able to colorize these log types as well.

Would you consider adding log.header and log.footer

If you are keen to allowing these commands, I would be happy to submit a PR for it (if you are too busy)

Thanks in advance for your consideration

Here is a sample of my log with these items

2018/09/10 14:27:40 PM HEADER ==> starting process
2018/09/10 14:27:40 PM INFO Start build
2018/09/10 14:27:40 PM INFO Finish build
2018/09/10 14:27:40 PM FOOTER ==> ending process
2018/09/10 14:27:45 PM HEADER ==> starting process
2018/09/10 14:27:45 PM INFO Start test:script
2018/09/10 14:27:45 PM INFO Finish test:script
2018/09/10 14:27:45 PM FOOTER ==> ending process

Does not work for me - no syntax highlighting at all

I've installed your extension recently in VS Code. Unfortunately it does not highlight log files at all. When I open log file there is no attempt to colorize it. I suspect that's because your plugin somehow does not try to work right away?

In bottom right corner I see label "vscode-output-colorizer". When I clik there I can select other syntax, I select "log" and only then I get highlighting. But selecting "log" for every file I open - very tedious, and that means I won't use your extension.

Just to be clear: file name is (just for example) "2016-11-22_09-07-38-worker-3511.log" - it has ".log" extension, right?

Will be nice to have it working though.

VS Code 1.7.2
Windows 7 SP1

ERROR syntax color

Hi,

I contacted the dev who created Atom One Dark theme because of some color issues but I think the issue is in Log File Highlighter so I will try here instead.

WARNING syntaxes in .log files is shown as red color but ERROR messages is shown as GREEN.
image

If I disable Log File Highlighter and only enable the theme it looks like this:
image

Is it possible to fix change the ERROR syntax so it is the same color as WARNING so I can use it together with the theme?

How to use ^ in customPatterns

Thanks for your work, this plugin is very useful.
Now I want to highlight lines that begin with "D/" or "E/", my customPatterns config is as below:

"logFileHighlighter.customPatterns": [
    {
        "pattern": "D/.+",
        "foreground": "black"
    },
    {
        "pattern": "E/.+",
        "foreground": "red"
    }
]

image

You can find that D/.+ not means 'the beginning of text is D/', because I don't use ^ in pattern.
I try ^D/.+ or \\^D/.+, but all didn't work.
How should I use ^ in customPatterns? Thank you.

Extend the log file highlighter to other formats (crm)

First, there is in general onother culture format for time for example 2016-10-25 12:21:08.340 the delimiter is not always comma.
Second, something like
[2016-10-25 12:21:17.105] Process: w3wp |Organization:2c451fe8-4e66-e311-b2c1-005056806411 |Thread: 11 |Category: Platform.Sql |User: b6da5baa-6c53-4c0d-81e2-0d0ec3b5f58c |Level: Error |ReqId: 9b2b1b3a-b532-4d51-8c9f-22045c47b2ae | BusinessProcessObject.ExecuteQuery ilOffset = 0x4A
Does not match the log levels althought Error is in there as a single word. Do you only check on all caps?

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.