refine contextlogger hook