Refact logger