add optional socket hook to logger

@anthonybishopric  @petertseng 
lets put this in its own file `socket_hook.go`