log = (msg, level) => {
    const ts = timestamp ? color(dateformat(new Date(), timestamp), '39') + ' ' : '';
    const c = colors[level.toLowerCase()] || '32';
    const output = `[${color(level.toUpperCase(), c)}] ${ts}${msg}`;
    console.log(output);
    return output;
  }
Logs a message to the console. The level is displayed in ANSI colors:
errors are bright red, warnings are yellow, and info is cyan.