logger for each middleware