implemented log formatting