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

Colorize logs #286

Merged
merged 12 commits into from May 31, 2017

Conversation

Projects
None yet
2 participants
@bragagia
Contributor

bragagia commented May 26, 2017

No description provided.

@@ -84,7 +84,10 @@ func dumpLogs(logsURL string, n int, filter string) error {
return nil
}
_, err = stdio.Copy(os.Stdout, res.Body)
//_, err = stdio.Copy(os.Stdout, res.Body)
buf := new(bytes.Buffer)

This comment has been minimized.

@Soulou

Soulou May 29, 2017

Member

With this method, you're putting everything in one big buffer, imagine there are A LOT of logs. That's something you want to do line by line with a bytes.StringReader for instance.

@Soulou

This comment has been minimized.

Member

Soulou commented May 29, 2017

It would be great to have special coloring for the router logs

2017-05-29 12:14:48.099387055 +0200 CEST [router] method=GET path="/v1/provider" host=<host> request_id=0059d1b6-d92c-413f-b1c6-cd8e1dfeecdc from="167.114.245.201" protocol=https status=404 duration=0.007s bytes=544 referer="-" user_agent="Go-http-client/1.1"
@bragagia

This comment has been minimized.

Contributor

bragagia commented May 29, 2017

@bragagia bragagia self-assigned this May 29, 2017

@bragagia

This comment has been minimized.

Contributor

bragagia commented May 29, 2017

Router log looks like that :
2017-05-29-164941_3808x2075_scrot

I add some fake spaces and backslash in a string and i remove the last quote to monkey proof the parser.

@Soulou

This comment has been minimized.

Member

Soulou commented on 3be921b May 31, 2017

Can you post a screenshot with the error hilighter?

@bragagia

This comment has been minimized.

Contributor

bragagia commented May 31, 2017

image

@Soulou Soulou merged commit 690cb8d into master May 31, 2017

@Soulou Soulou referenced this pull request May 31, 2017

Closed

Colorizing logs output #288

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment