fix logging with postgresql