Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log highlighting format with IntelliJ/Pycharm ideolog #93

Open
pjpjq opened this issue May 4, 2019 · 10 comments
Open

Log highlighting format with IntelliJ/Pycharm ideolog #93

pjpjq opened this issue May 4, 2019 · 10 comments

Comments

@pjpjq
Copy link

pjpjq commented May 4, 2019

image
I saved the log into a .log file. IntelliJ ideolog suggests "log format not recognized" and need to configure log format pattern for better highlighting. Is it possible to make it highlighted better in IntelliJ/Pycharm with ideolog plugin?

@AtHeartEngineer
Copy link

@wendingp
I have been messing around with this for the last 30 minutes trying to get something to work. It doesn't work yet, but if anyone wants to help, that would be super cool. I've double checked it at regexr.com and it...should be working, but doesn't.

Message Pattern:^(\d{2}:\d{2}:\d{2}.\d{6})\s+(\w+)\s+(\d+)\s+(.*)$
I've tried ^(?m) at the beginning also to enable multi-line mode...but that doesn't do anything.

Message Start Pattern: ^\d

Time Format: I've tried HH:mm:ss.SSS and HH:mm:ss.SSSSSS and ^\d{2}:\d{2}:\d{2}.\d{6}

@625781186
Copy link

@wendingp
I use vscode .
Need install plugin log file highlighter.
image

image

In addition , pycharm poor support for large files.

@alexmojaki
Copy link
Collaborator

@625781186 that's snoop, not PySnooper.

@cool-RR wow I guess the potential for confusion is worse than I thought...

@cool-RR
Copy link
Owner

cool-RR commented Jul 15, 2019 via email

@625781186
Copy link

@alexmojaki
Haha, I know I use snoop , but I just talk about a better method to read .log file.

@alexmojaki
Copy link
Collaborator

@625781186 what I mean is that there's no >>> Call to or <<< Return value in PySnooper, it's only in snoop.

In any case for snoop it might be better to use the provided coloring which includes syntax highlighting. If you just output to the default stderr it should work, but if you want to use a file you can force color with snoop.install(color=True) and then view the file with a tool that supports ANSI escape codes (unfortunately vscode-logfile-highlighter doesn't right now), such as the less command in a Unix terminal.

@625781186
Copy link

@625781186 what I mean is that there's no >>> Call to or <<< Return value in PySnooper, it's only in snoop.

In any case for snoop it might be better to use the provided coloring which includes syntax highlighting. If you just output to the default stderr it should work, but if you want to use a file you can force color with snoop.install(color=True) and then view the file with a tool that supports ANSI escape codes (unfortunately vscode-logfile-highlighter doesn't right now), such as the less command in a Unix terminal.

@cool-RR

Hello , How do I fold code in markdown like you ? Thank you.

@cool-RR
Copy link
Owner

cool-RR commented Jul 19, 2019

I think it's automatic because I made a comment by replying on GMail to GitHub's notification.

@625781186
Copy link

@cool-RR

Can you copy the source code of #93 (comment) for me to see? I'm really curious.

image

@cool-RR
Copy link
Owner

cool-RR commented Jul 19, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants