How to use the @google-cloud/logging.Logging.prototype function in @google-cloud/logging

To help you get started, we’ve selected a few @google-cloud/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 ovhemert / pino-stackdriver / test / helpers.js View on Github external
module.exports.stubLogging = () => {
  return sinon.stub(Logging.prototype, 'log').callsFake(() => {
    const _log = function (entry, callback) { callback() }
    return {
      entry: function (meta, data) { return {} },
      debug: _log,
      info: _log,
      warning: _log,
      error: _log,
      critical: _log,
      default: _log
    }
  })
}

@google-cloud/logging

Cloud Logging Client Library for Node.js

Apache-2.0
Latest version published 10 months ago

Package Health Score

88 / 100
Full package analysis