update addLog function on index.js