add condition on logs