From 79518591be913e8600f897ab9f5efa515d605bc2 Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Fri, 24 Mar 2017 21:35:46 +0000 Subject: [PATCH] =?UTF-8?q?Log=20server=20=E2=80=98starting=E2=80=99=20and?= =?UTF-8?q?=20=E2=80=98started=E2=80=99=20messages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tcp/tcp.go | 5 +++++ web/web.go | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/tcp/tcp.go b/tcp/tcp.go index 0c7b7ede..577df72a 100644 --- a/tcp/tcp.go +++ b/tcp/tcp.go @@ -87,7 +87,12 @@ func Setup(opts *cnf.Options) (err error) { } }() + // Log successful start + + log.WithPrefix("tcp").Infof("Started tcp server on %s", opts.Conn.Tcp) + return + } func Send(name string, data []byte) { diff --git a/web/web.go b/web/web.go index f0d2cdf2..7b00b2fe 100644 --- a/web/web.go +++ b/web/web.go @@ -58,9 +58,13 @@ func Setup(opts *cnf.Options) (err error) { // Check body size s.Use(mw.Size(&mw.SizeOpts{ - AllowedLength: 1 << 20, + AllowedLength: 1 << 20, // 1mb })) + // Log successful start + + log.WithPrefix("web").Infof("Started web server on %s", opts.Conn.Web) + // Run the server if len(opts.Cert.Crt) == 0 || len(opts.Cert.Key) == 0 {