format logging correctly