Skip to content

Instantly share code, notes, and snippets.

@thewilkybarkid
Created September 17, 2013 15:08
Show Gist options
  • Save thewilkybarkid/6595645 to your computer and use it in GitHub Desktop.
Save thewilkybarkid/6595645 to your computer and use it in GitHub Desktop.
Patch for the Drupal Varnish module (7.x-1.0-beta2) to log successful command runs.
diff --git a/varnish.module b/varnish.module
index 80e7af2..21dfd8e 100644
--- a/varnish.module
+++ b/varnish.module
@@ -288,6 +288,7 @@ function _varnish_execute_command($client, $command) {
}
else {
// successful connection
+ watchdog('varnish', 'Successfully ran command: %command', array('%command' => $command), WATCHDOG_INFO);
return $status;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment