How to use bunyan-seq - 2 common examples

To help you get started, we’ve selected a few bunyan-seq examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github imodeljs / imodeljs / core / logger-config / src / SeqLoggerConfig.ts View on Github external
seqStreamParams.batchSizeLimit = seqConfig.batchSizeLimit;

    if (seqConfig.maxBatchingTime !== undefined)
      seqStreamParams.maxBatchingTime = seqConfig.maxBatchingTime;

    if (seqConfig.reemitErrorEvents !== undefined)
      seqStreamParams.reemitErrorEvents = seqConfig.reemitErrorEvents;

    // NB: Define only one bunyan stream! Otherwise, we will get logging messages coming out multiple times, once for each stream. (https://github.com/trentm/node-bunyan/issues/334)
    // This one stream must accept messages at all levels. That is why we set it to "trace". That is just its lower limit.
    seqStreamParams.level = "trace";

    const bunyanLogger = bunyan.createLogger({
      name: loggerName,
      streams: [
        seq.createStream(seqStreamParams),
      ],
    });
    return bunyanLogger;
  }
github TypedProject / ts-express-decorators / packages / seq / src / appenders / SeqAppender.ts View on Github external
build() {
    if ($log.level !== "OFF") {
      this.logger = createLogger({
        name: $log.name,
        streams: [
          createStream({
            serverUrl: this.config.url,
            apiKey: this.config.apiKey,
            level: $log.level
          })
        ]
      });
    }
  }

bunyan-seq

A Bunyan stream that sends log events to Seq

Apache-2.0
Latest version published 1 year ago

Package Health Score

59 / 100
Full package analysis

Popular bunyan-seq functions