get_log_data(last_n_lines) function, implemented client-side for now