summaryrefslogtreecommitdiffstats
path: root/lib/webserver/server.go
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2017-08-24 21:23:40 +0200
committerSebastien Douheret <sebastien.douheret@iot.bzh>2017-08-24 21:28:28 +0200
commit347bd1674bbf67ccb6209951a4bf8f2971715532 (patch)
treeb34495fe40d7cf6c0d08a5b9a6b977b3981f9496 /lib/webserver/server.go
parent2fed63ed0087df0c79f7f30f7f397611381bfccd (diff)
Redirect HTTP and Gin server logs into a file (xds-server-verbose.log).
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
Diffstat (limited to 'lib/webserver/server.go')
-rw-r--r--lib/webserver/server.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/webserver/server.go b/lib/webserver/server.go
index 5183208..8639b66 100644
--- a/lib/webserver/server.go
+++ b/lib/webserver/server.go
@@ -46,10 +46,10 @@ func New(cfg *xdsconfig.Config, mfolders *model.Folders, sdks *crosssdk.SDKs, lo
gin.SetMode(gin.ReleaseMode)
}
- // Redirect gin logs into logrus logger
- gin.DefaultWriter = logr.Out
- gin.DefaultErrorWriter = logr.Out
- log.SetOutput(logr.Out)
+ // Redirect gin logs into another logger (LogVerboseOut may be stderr or a file)
+ gin.DefaultWriter = cfg.LogVerboseOut
+ gin.DefaultErrorWriter = cfg.LogVerboseOut
+ log.SetOutput(cfg.LogVerboseOut)
// FIXME - fix pb about isTerminal=false when out is in VSC Debug Console