Skip to content

Conversation

MargotLepizzera
Copy link
Contributor

@MargotLepizzera MargotLepizzera commented Nov 5, 2018

What does this PR do?

After several tests, it appears that when building containers using docker-compose with the documentation pattern ("\d{4}\-(0?[1-9]|1[012])\-(0?[1-9]|[12][0-9]|3[01])"), no logs whatsoever are coming in.
According to Nils:

the pattern is not recognised as valid then. And when we fail to parse the configuration we do not tail the container at all (hopefully this will get changed in 6.7 - not 6.6)

This was tested with Postgresql logs, that do not start with a timestamp:

  • When using this "\d{4}\-(0?[1-9]|1[012])\-(0?[1-9]|[12][0-9]|3[01])" as regex pattern, no logs at all are coming in
  • When using this "\\d{4}\-(0?[1-9]|1[012])\-(0?[1-9]|[12][0-9]|3[01])" as regex pattern, logs are coming in
  • When using "foo" as regex pattern, logs are coming in

It was also tested with Nginx logs, that do start with a timestamp

  • When using this "\d{4}\-(0?[1-9]|1[012])\-(0?[1-9]|[12][0-9]|3[01])" as regex pattern, no logs at all are coming in
  • When using this "\\d{4}\-(0?[1-9]|1[012])\-(0?[1-9]|[12][0-9]|3[01])" as regex pattern, logs are coming in

I performed several other tests that seem to converge toward this same conclusion but I could definitely use a double check by someone else.
Customer ended up with this conclusion as well:

More details about this on this Slack convo:
https://dd.slack.com/archives/C6QR6DXJ4/p1540287215000100
https://cl.ly/c48752cc034f

Motivation

Preview link

Additional Notes

@MargotLepizzera MargotLepizzera requested review from mstbbs and a team as code owners November 5, 2018 10:40
Copy link

@NBParis NBParis left a comment

Choose a reason for hiding this comment

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

LGTM

@l0k0ms l0k0ms merged commit 5dca553 into master Nov 5, 2018
@l0k0ms l0k0ms deleted the MargotLepizzera-dockercompose-multiline-regex branch November 5, 2018 14:13
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.

4 participants