moves db logger to model