Log server ‘starting’ and ‘started’ messages
This commit is contained in:
parent
5a558c0d6f
commit
79518591be
2 changed files with 10 additions and 1 deletions
|
@ -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
|
return
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func Send(name string, data []byte) {
|
func Send(name string, data []byte) {
|
||||||
|
|
|
@ -58,9 +58,13 @@ func Setup(opts *cnf.Options) (err error) {
|
||||||
// Check body size
|
// Check body size
|
||||||
|
|
||||||
s.Use(mw.Size(&mw.SizeOpts{
|
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
|
// Run the server
|
||||||
|
|
||||||
if len(opts.Cert.Crt) == 0 || len(opts.Cert.Key) == 0 {
|
if len(opts.Cert.Crt) == 0 || len(opts.Cert.Key) == 0 {
|
||||||
|
|
Loading…
Reference in a new issue