aboutsummaryrefslogtreecommitdiffstats
path: root/log/handler_glog.go
diff options
context:
space:
mode:
Diffstat (limited to 'log/handler_glog.go')
-rw-r--r--log/handler_glog.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/log/handler_glog.go b/log/handler_glog.go
index f8b932fd1..83dae44bd 100644
--- a/log/handler_glog.go
+++ b/log/handler_glog.go
@@ -57,6 +57,11 @@ func NewGlogHandler(h Handler) *GlogHandler {
}
}
+// SetHandler updates the handler to write records to the specified sub-handler.
+func (h *GlogHandler) SetHandler(nh Handler) {
+ h.origin = nh
+}
+
// pattern contains a filter for the Vmodule option, holding a verbosity level
// and a file pattern to match.
type pattern struct {