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

skip empty lines #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

skip empty lines #11

wants to merge 1 commit into from

Conversation

elnygren
Copy link

@elnygren elnygren commented Sep 29, 2016

I noticed that supervisor-stdout created a lot of empty rows when I ran
docker logs -f <my_container.

This small change did the trick for me. However, it might be that this kind of filtering is not desirable.

I'm speculating the empty rows arise because:

>>> d = 'data\n\n'.split('\n', 1)
>>> d
['data', '\n']
>>> print('\n'.join(d))
data


>>>

My setup is this:

  • Django logs to stdout
  • uwsgi runs Django and logs everything to stdout
  • supervisor runs nginx and uwsgi and uses supervisor-stdout

@coderanger
Copy link
Owner

If there are blank lines in the data feed, they should be in the output here. Your example shows the correct behavior.

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