How to use the bunyan-seq.createStream function in bunyan-seq

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 2 years ago

Package Health Score

48 / 100
Full package analysis

Popular bunyan-seq functions