async function logs (count = 1, timeout = 5000) {
    let start = Date.now();

    // Wait until we acquire the requested number of logs
    while (logbuffer.length < count) {
        await wait(100);

        if (Date.now() - start > timeout) {
            break;
        }
    }

    // return the logs and clear it afterwards
    return logbuffer.splice(0, logbuffer.length);
}
Returns a list of logs.
Waits until the number of requested logs have accumulated.
There's a timeout to force it to stop checking.

@param {Number} count 
@param {Number} timeout 
@returns {Promise<String[]>}