move loggers' code to separate lib directory