diff --git a/logger.go b/logging/logging.go similarity index 99% rename from logger.go rename to logging/logging.go index caa77df..369b973 100644 --- a/logger.go +++ b/logging/logging.go @@ -1,4 +1,4 @@ -package main +package logging import ( "io" diff --git a/main.go b/main.go index a9d735d..b2486b1 100644 --- a/main.go +++ b/main.go @@ -8,9 +8,13 @@ import ( "os" ) +import ( + "milter-experiment/logging" +) + var ( // Global logger for application wide logging. Not sure if this is a good pattern yet. - logger Logger + logger logging.Logger ) func handleMtaConnection(clientConnection *bufio.ReadWriter) { @@ -38,6 +42,6 @@ func handleMtaConnection(clientConnection *bufio.ReadWriter) { } func main() { - logger = NewLogger(os.Stdout, os.Stderr, DEBUG) + logger = logging.NewLogger(os.Stdout, os.Stderr, logging.DEBUG) runServer() }