Format logs