refactor .context for logger