How to use the error function from fancy-log

Find comprehensive JavaScript fancy-log.error code examples handpicked from public code repositorys.

60
61
62
63
64
65
66
67
68
69

watcher.on("event", (event) => {
  if (event.code === "BUNDLE_END") {
    log(`Build done @ ${new Date().toLocaleTimeString()}`);
  } else if (event.code === "ERROR") {
    log.error(event.error);
  } else if (event.code === "END") {
    if (startedHttp || !serveOptions) {
      return;
    }
fork icon0
star icon10
watch icon2

+ 15 other calls in file

437
438
439
440
441
442
443
444
445
446
    const match = relativePath.match(/[^\/]+(\/server|\/client)?/);
    fancyLog(`Finished ${ansiColors.green(taskName)} ${ansiColors.cyan(match[0])} with ${stats.errors.length} errors.`);
}
if (Array.isArray(stats.errors)) {
    stats.errors.forEach((error) => {
        fancyLog.error(error);
    });
}
if (Array.isArray(stats.warnings)) {
    stats.warnings.forEach((warning) => {
fork icon0
star icon4
watch icon1

+ 2 other calls in file

47
48
49
50
51
52
53
54
55
56
b.on('log', log); // output build logs to terminal

stream = b
  .bundle()
  .on('error', function (err) {
    log.error('Browserify Error', err);
    stream.emit('error', err);
  })
  .pipe(vinyl_source_stream(bundle_name))
  .pipe(vinyl_buffer())
fork icon0
star icon0
watch icon1

+ 9 other calls in file

80
81
82
83
84
85
86
87
88
89
90
91


  try {
    await git.rebase(["--interactive", toBranch.commit]);
    log.info("Ребейс успешно завершен (Возможно необходимо решить конфликты)");
  } catch (e) {
    log.error(e.message);
  }


  log.info("Подготовка успешно выполнена");
};
fork icon0
star icon0
watch icon1

+ 12 other calls in file