make log  function