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

Add logger client #15

patoroco opened this issue Apr 11, 2019 · 1 comment


None yet
2 participants
Copy link

commented Apr 11, 2019

During development, should be really helpful to have a dummy statsd client that instead of try to send the metrics to the real statsd, it just print logs with the metrics that you're trying to send.


This comment has been minimized.

Copy link

commented Apr 11, 2019

That's easily done actually :)
First, set the statsd client to point to a non-existing statsd server. Since it uses udp it won't care if the server exists or not, it will silently fail.
Second, set the logging for statsd to info or higher.

So... something along these lines:

# Settings:

# Set the log level
import logging
logger = logging.getLogger('statsd')

# If you don't have any logging setup yet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.