add optional socket hook to logger

@anthonybishopric  @petertseng 
sounds good