Add .gitignore, make hexdump look better in log output
This commit is contained in:
parent
2e4d5eae8a
commit
2ac79b8c2d
|
@ -0,0 +1 @@
|
|||
milter-experiment
|
3
main.go
3
main.go
|
@ -9,6 +9,7 @@ import (
|
|||
)
|
||||
|
||||
var (
|
||||
// Global logger for application wide logging. Not sure if this is a good pattern yet.
|
||||
logger Logger
|
||||
)
|
||||
|
||||
|
@ -21,7 +22,7 @@ func handleMtaConnection(clientConnection *bufio.ReadWriter) {
|
|||
break
|
||||
} else {
|
||||
logger.Infof("Read %d bytes from connection\n", bytesRead)
|
||||
logger.Debugf("%s", hex.Dump(buf[0:bytesRead]))
|
||||
logger.Debugf("Hexdump of bytes read:\n%s", hex.Dump(buf[0:bytesRead]))
|
||||
|
||||
// First 4 Bytes will be some integer thing "length"
|
||||
// Let's parse that
|
||||
|
|
Loading…
Reference in New Issue