Ema has submitted this change and it was merged.
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(-)
Approvals:
Ema: Verified; Looks good to me, approved
BBlack: Looks good to me, but someone else must approve
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: merged
Gerrit-Change-Id: If7707312d3a166c90efd21d7222168c0c92aca3d
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ema <[email protected]>
Gerrit-Reviewer: BBlack <[email protected]>
Gerrit-Reviewer: Elukey <[email protected]>
Gerrit-Reviewer: Ema <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits