Split loging api from log management code