implmented addLog and log