Move logger into own logging package
This commit is contained in:
parent
2ac79b8c2d
commit
4ac79cc44f
|
@ -1,4 +1,4 @@
|
||||||
package main
|
package logging
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"io"
|
"io"
|
8
main.go
8
main.go
|
@ -8,9 +8,13 @@ import (
|
||||||
"os"
|
"os"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
import (
|
||||||
|
"milter-experiment/logging"
|
||||||
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
// Global logger for application wide logging. Not sure if this is a good pattern yet.
|
// 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) {
|
func handleMtaConnection(clientConnection *bufio.ReadWriter) {
|
||||||
|
@ -38,6 +42,6 @@ func handleMtaConnection(clientConnection *bufio.ReadWriter) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
logger = NewLogger(os.Stdout, os.Stderr, DEBUG)
|
logger = logging.NewLogger(os.Stdout, os.Stderr, logging.DEBUG)
|
||||||
runServer()
|
runServer()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue