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

This patch supports sending logs over UDP #81

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

panaetov
Copy link

@panaetov panaetov commented Mar 14, 2017

To send logs over udp you need to specify host parameter as udp://ip[:port]. If you want to use TCP you may specify no prefixes, e.g, localhost or define host as tcp://ip[:port].
Also I have made some changes in tests, namely, I have replaced thread-based realization of fluent's mock with thin wrapper of socket object. It makes possible to use old tests to test both tpc and udp implementations. Also it makes tests more straight and clear, because you can check messages recieved by mock in real-time (now you cannot check messages before connection to mock is closed).

@coveralls
Copy link

coveralls commented Mar 14, 2017

Coverage Status

Coverage increased (+0.8%) to 90.61% when pulling 49a6182 on panaetov:feature/send_logs_with_udp into 5c4dff1 on fluent:master.

@protoss-player
Copy link

Looks like this PR addresses #75.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.3%) to 90.045% when pulling 8c0b4b8 on panaetov:feature/send_logs_with_udp into 5c4dff1 on fluent:master.

2 similar comments
@coveralls
Copy link

Coverage Status

Coverage increased (+0.3%) to 90.045% when pulling 8c0b4b8 on panaetov:feature/send_logs_with_udp into 5c4dff1 on fluent:master.

@coveralls
Copy link

coveralls commented Mar 15, 2017

Coverage Status

Coverage increased (+0.3%) to 90.045% when pulling 8c0b4b8 on panaetov:feature/send_logs_with_udp into 5c4dff1 on fluent:master.

@repeatedly
Copy link
Member

JSON support should be separated to other PR.

def close(self):
super(TCPServer, self).close()
if self.accepted_connection:
self.accepted_connection.close()
Copy link
Member

Choose a reason for hiding this comment

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

should set None to accepted_connection?

# that all encoding is utf-8.
return list(Unpacker(self._buf, encoding='utf-8'))

return list(messages)
Copy link
Member

Choose a reason for hiding this comment

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

why list call again?

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