How to use the @loopback/extension-logging.LoggingBindings.FLUENT_SENDER function in @loopback/extension-logging

To help you get started, we’ve selected a few @loopback/extension-logging 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 strongloop / loopback-next / acceptance / extension-logging-fluentd / src / __tests__ / accpetance / fluent.acceptance.ts View on Github external
it('throws error if fluent is not configured', async function() {
    if (process.env.FLUENTD_SERVICE_PORT_TCP == null) return this.skip();

    // Remove the configuration for fluent sender
    app.unbind(BindingKey.buildKeyForConfig(LoggingBindings.FLUENT_SENDER));
    return expect(app.get(LoggingBindings.FLUENT_SENDER)).to.be.rejectedWith(
      /Fluent is not configured\. Please configure logging\.fluent\.sender\./,
    );
  });
github strongloop / loopback-next / acceptance / extension-logging-fluentd / src / __tests__ / accpetance / fluent.acceptance.ts View on Github external
it('throws error if fluent is not configured', async function() {
    if (process.env.FLUENTD_SERVICE_PORT_TCP == null) return this.skip();

    // Remove the configuration for fluent sender
    app.unbind(BindingKey.buildKeyForConfig(LoggingBindings.FLUENT_SENDER));
    return expect(app.get(LoggingBindings.FLUENT_SENDER)).to.be.rejectedWith(
      /Fluent is not configured\. Please configure logging\.fluent\.sender\./,
    );
  });

@loopback/extension-logging

An extension exposes logging for Winston and Fluentd with LoopBack 4

MIT
Latest version published 4 years ago

Package Health Score

67 / 100
Full package analysis