How to use the @google-cloud/logging.log 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 UnaBiz / sigfox-gcloud / lib / gcloud.js View on Github external
function getLogger() {
  //  Return the logger object for writing logs.  Create it if necessary.
  if (!loggingLog) { // eslint-disable-next-line global-require
    loggingLog = require('@google-cloud/logging')(credentials)
      .log(logName, { removeCircular: true }); //  Mark circular refs by [Circular]
    console.log('created_logger');
  }
  return loggingLog;
}

@google-cloud/logging

Cloud Logging Client Library for Node.js

Apache-2.0
Latest version published 3 months ago

Package Health Score

88 / 100
Full package analysis