1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-21 11:37:07 +00:00

Make log level configurable

This commit is contained in:
James Hillyerd
2012-10-22 18:07:16 -07:00
parent 3099777044
commit 16a68000d3
5 changed files with 101 additions and 0 deletions

View File

@@ -7,6 +7,7 @@ import (
"flag"
"fmt"
"github.com/jhillyerd/inbucket/config"
"github.com/jhillyerd/inbucket/log"
"github.com/jhillyerd/inbucket/smtpd"
"github.com/jhillyerd/inbucket/web"
"os"
@@ -32,6 +33,10 @@ func main() {
os.Exit(1)
}
// Configure logging
level, _ := config.Config.String("logging", "level")
log.SetLogLevel(level)
// Startup SMTP server
server := smtpd.New()
go server.Start()