From 2f68519b3c6b5a70028882c99afeb76f291b7725 Mon Sep 17 00:00:00 2001 From: Wim Date: Thu, 23 Mar 2017 23:28:55 +0100 Subject: Add gops agent --- matterbridge.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'matterbridge.go') diff --git a/matterbridge.go b/matterbridge.go index 51184774..c9716d44 100644 --- a/matterbridge.go +++ b/matterbridge.go @@ -7,6 +7,7 @@ import ( "github.com/42wim/matterbridge/gateway" "github.com/42wim/matterbridge/gateway/samechannel" log "github.com/Sirupsen/logrus" + "github.com/google/gops/agent" ) var ( @@ -22,7 +23,12 @@ func main() { flagConfig := flag.String("conf", "matterbridge.toml", "config file") flagDebug := flag.Bool("debug", false, "enable debug") flagVersion := flag.Bool("version", false, "show version") + flagGops := flag.Bool("gops", false, "enable gops agent") flag.Parse() + if *flagGops { + agent.Listen(&agent.Options{}) + defer agent.Close() + } if *flagVersion { fmt.Printf("version: %s %s\n", version, githash) return -- cgit v1.2.3