Add .gitignore, make hexdump look better in log output
This commit is contained in:
@@ -0,0 +1 @@
|
||||
milter-experiment
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user