lua logs function add