More flexible logger