logger initial code