replace logger with logging, format logging with datetime