Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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;
}