Ema has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/283179

Change subject: varnishstatsd: log ValueError exceptions
......................................................................

varnishstatsd: log ValueError exceptions

Log ValueError exceptions as well as all the arguments passed to
vsl_callback.

Bug: T132430
Change-Id: If7707312d3a166c90efd21d7222168c0c92aca3d
---
M modules/varnish/files/varnishstatsd
1 file changed, 12 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/79/283179/1

diff --git a/modules/varnish/files/varnishstatsd 
b/modules/varnish/files/varnishstatsd
index 93ebc55..5106198 100755
--- a/modules/varnish/files/varnishstatsd
+++ b/modules/varnish/files/varnishstatsd
@@ -97,6 +97,18 @@
 buf = io.BytesIO()
 
 
+def log_value_err(callback):
+    def wrapper(transaction_id, tag, record, remote_party):
+        try:
+            return callback(transaction_id, tag, record, remote_party)
+        except ValueError as err:
+            print locals()
+            return
+
+    return wrapper
+
+
+@log_value_err
 def vsl_callback(transaction_id, tag, record, remote_party):
     global buf
 

-- 
To view, visit https://gerrit.wikimedia.org/r/283179
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If7707312d3a166c90efd21d7222168c0c92aca3d
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ema <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to