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

Preserve leading whitespace in logs #875

Merged
merged 1 commit into from
Nov 3, 2017
Merged

Conversation

scoplin
Copy link
Contributor

@scoplin scoplin commented Oct 7, 2017

Changes the log line match pattern to preserve leading whitespace in log
lines by only consuming a single space delimiter between the timestamp
and the message body.

Signed-off-by: Scott Coplin [email protected]

Changes the log line match pattern to preserve leading whitespace in log
lines by only consuming a single space delimiter between the timestamp
and the message body.

Signed-off-by: Scott Coplin <[email protected]>
@codecov
Copy link

codecov bot commented Oct 7, 2017

Codecov Report

Merging #875 into master will not change coverage.
The diff coverage is 100%.

@@            Coverage Diff            @@
##             master     #875   +/-   ##
=========================================
  Coverage     50.46%   50.46%           
  Complexity     1180     1180           
=========================================
  Files           137      137           
  Lines          7033     7033           
  Branches        935      935           
=========================================
  Hits           3549     3549           
  Misses         3177     3177           
  Partials        307      307
Impacted Files Coverage Δ Complexity Δ
.../fabric8/maven/docker/access/log/LogRequestor.java 63.82% <100%> (ø) 13 <1> (ø) ⬇️

@scoplin
Copy link
Contributor Author

scoplin commented Oct 7, 2017

I'm not sure what the original reason for the \s+ pattern was in the log line matching, but looking at the docker api source code, it looks like it has used a single space to delimit timestamp from body for at least several years now, even through refactorings. I tracked it back at least as far as this commit:

commit 5104b34c443be90644b1ddad12b7b128ed4f168c
Author: Brian Goff <[email protected]>
Date:   Fri Jul 3 09:50:06 2015 -0400

Copy link
Collaborator

@rhuss rhuss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, and sorry for the long delay.

@rhuss rhuss merged commit 5eae2c3 into fabric8io:master Nov 3, 2017
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

Successfully merging this pull request may close these issues.

2 participants