Socket
Socket
Sign inDemoInstall

@google-cloud/logging-min

Package Overview
Dependencies
Maintainers
4
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@google-cloud/logging-min - npm Package Compare versions

Comparing version 10.0.0 to 10.0.1

2

build/src/log-sync.js

@@ -1,2 +0,2 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.LogSync=void 0;const entry_1=require("./entry");const instrumentation_1=require("./utils/instrumentation");const log_common_1=require("./utils/log-common");class LogSync{constructor(logging,name,transport){this.formattedName_=(0,log_common_1.formatLogName)(logging.projectId,name);this.logging=logging;this.name=this.formattedName_.split("/").pop();this.transport=transport||process.stdout}alert(entry,options){this.write((0,log_common_1.assignSeverityToEntries)(entry,"ALERT"),options)}critical(entry,options){this.write((0,log_common_1.assignSeverityToEntries)(entry,"CRITICAL"),options)}debug(entry,options){this.write((0,log_common_1.assignSeverityToEntries)(entry,"DEBUG"),options)}emergency(entry,options){this.write((0,log_common_1.assignSeverityToEntries)(entry,"EMERGENCY"),options)}entry(metadataOrData,data){let metadata;if(!data&&metadataOrData!==null&&Object.prototype.hasOwnProperty.call(metadataOrData,"httpRequest")){metadata=metadataOrData;data={}}else if(!data){data=metadataOrData;metadata={}}else{metadata=metadataOrData}return this.logging.entry(metadata,data)}error(entry,options){this.write((0,log_common_1.assignSeverityToEntries)(entry,"ERROR"),options)}info(entry,options){this.write((0,log_common_1.assignSeverityToEntries)(entry,"INFO"),options)}notice(entry,options){this.write((0,log_common_1.assignSeverityToEntries)(entry,"NOTICE"),options)}warning(entry,options){this.write((0,log_common_1.assignSeverityToEntries)(entry,"WARNING"),options)}write(entry,opts){var _a;const options=opts?opts:{};let structuredEntries;this.formattedName_=(0,log_common_1.formatLogName)(this.logging.projectId,this.name);try{structuredEntries=(0,instrumentation_1.populateInstrumentationInfo)(entry).map(entry=>{if(!(entry instanceof entry_1.Entry)){entry=this.entry(entry)}return entry.toStructuredJSON(this.logging.projectId)});for(const entry of structuredEntries){entry.logName=this.formattedName_;entry.resource=(0,log_common_1.snakecaseKeys)((_a=options.resource)===null||_a===void 0?void 0:_a.labels)||entry.resource||this.logging.detectedResource;entry[entry_1.LABELS_KEY]=options.labels||entry[entry_1.LABELS_KEY];this.transport.write(JSON.stringify(entry)+"\n")}}catch(err){}}}exports.LogSync=LogSync;
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.LogSync=void 0;const entry_1=require("./entry");const instrumentation_1=require("./utils/instrumentation");const log_common_1=require("./utils/log-common");class LogSync{constructor(logging,name,transport){this.formattedName_=(0,log_common_1.formatLogName)(logging.projectId,name);this.logging=logging;this.name=this.formattedName_.split("/").pop();this.transport=transport||process.stdout}alert(entry,options){this.write((0,log_common_1.assignSeverityToEntries)(entry,"ALERT"),options)}critical(entry,options){this.write((0,log_common_1.assignSeverityToEntries)(entry,"CRITICAL"),options)}debug(entry,options){this.write((0,log_common_1.assignSeverityToEntries)(entry,"DEBUG"),options)}emergency(entry,options){this.write((0,log_common_1.assignSeverityToEntries)(entry,"EMERGENCY"),options)}entry(metadataOrData,data){let metadata;if(!data&&metadataOrData!==null&&Object.prototype.hasOwnProperty.call(metadataOrData,"httpRequest")){metadata=metadataOrData;data={}}else if(!data){data=metadataOrData;metadata={}}else{metadata=metadataOrData}return this.logging.entry(metadata,data)}error(entry,options){this.write((0,log_common_1.assignSeverityToEntries)(entry,"ERROR"),options)}info(entry,options){this.write((0,log_common_1.assignSeverityToEntries)(entry,"INFO"),options)}notice(entry,options){this.write((0,log_common_1.assignSeverityToEntries)(entry,"NOTICE"),options)}warning(entry,options){this.write((0,log_common_1.assignSeverityToEntries)(entry,"WARNING"),options)}write(entry,opts){var _a;const options=opts?opts:{};let structuredEntries;this.formattedName_=(0,log_common_1.formatLogName)(this.logging.projectId,this.name);try{structuredEntries=(0,instrumentation_1.populateInstrumentationInfo)(entry)[0].map(entry=>{if(!(entry instanceof entry_1.Entry)){entry=this.entry(entry)}return entry.toStructuredJSON(this.logging.projectId)});for(const entry of structuredEntries){entry.logName=this.formattedName_;entry.resource=(0,log_common_1.snakecaseKeys)((_a=options.resource)===null||_a===void 0?void 0:_a.labels)||entry.resource||this.logging.detectedResource;entry[entry_1.LABELS_KEY]=options.labels||entry[entry_1.LABELS_KEY];this.transport.write(JSON.stringify(entry)+"\n")}}catch(err){}}}exports.LogSync=LogSync;
//# sourceMappingURL=log-sync.js.map

@@ -1,2 +0,2 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.Log=void 0;const promisify_1=require("@google-cloud/promisify");const dotProp=require("dot-prop");const extend=require("extend");const entry_1=require("./entry");const instrumentation_1=require("./utils/instrumentation");const log_common_1=require("./utils/log-common");class Log{constructor(logging,name,options){options=options||{};this.formattedName_=(0,log_common_1.formatLogName)(logging.projectId,name);this.removeCircular_=options.removeCircular===true;this.maxEntrySize=options.maxEntrySize;this.logging=logging;this.name=this.formattedName_.split("/").pop();this.jsonFieldsToTruncate=["jsonPayload.fields.metadata.structValue.fields.stack.stringValue","jsonPayload.fields.msg.stringValue","jsonPayload.fields.err.structValue.fields.stack.stringValue","jsonPayload.fields.err.structValue.fields.message.stringValue","jsonPayload.fields.message.stringValue"];if(options.jsonFieldsToTruncate!==null&&options.jsonFieldsToTruncate!==undefined){const filteredList=options.jsonFieldsToTruncate.filter(str=>str!==null&&!this.jsonFieldsToTruncate.includes(str)&&str.startsWith("jsonPayload"));const uniqueSet=new Set(filteredList);this.jsonFieldsToTruncate=Array.from(uniqueSet).concat(this.jsonFieldsToTruncate)}this.defaultWriteDeleteCallback=options.defaultWriteDeleteCallback}alert(entry,options){return this.write((0,log_common_1.assignSeverityToEntries)(entry,"ALERT"),options)}critical(entry,options){return this.write((0,log_common_1.assignSeverityToEntries)(entry,"CRITICAL"),options)}debug(entry,options){return this.write((0,log_common_1.assignSeverityToEntries)(entry,"DEBUG"),options)}async delete(gaxOptions){const projectId=await this.logging.auth.getProjectId();this.formattedName_=(0,log_common_1.formatLogName)(projectId,this.name);const reqOpts={logName:this.formattedName_};return this.logging.loggingService.deleteLog(reqOpts,gaxOptions,this.defaultWriteDeleteCallback)}emergency(entry,options){return this.write((0,log_common_1.assignSeverityToEntries)(entry,"EMERGENCY"),options)}entry(metadataOrData,data){let metadata;if(!data&&metadataOrData!==null&&Object.prototype.hasOwnProperty.call(metadataOrData,"httpRequest")){metadata=metadataOrData;data={}}else if(!data){data=metadataOrData;metadata={}}else{metadata=metadataOrData}return this.logging.entry(metadata,data)}error(entry,options){return this.write((0,log_common_1.assignSeverityToEntries)(entry,"ERROR"),options)}async getEntries(opts){const options=extend({},opts);const projectId=await this.logging.auth.getProjectId();this.formattedName_=(0,log_common_1.formatLogName)(projectId,this.name);if(options.filter&&!options.filter.includes("logName=")){options.filter=`(${options.filter}) AND logName="${this.formattedName_}"`}else if(!options.filter){options.filter=`logName="${this.formattedName_}"`}return this.logging.getEntries(options)}getEntriesStream(options){options=extend({log:this.name},options);return this.logging.getEntriesStream(options)}tailEntries(options){options=extend({log:this.name},options);return this.logging.tailEntries(options)}info(entry,options){return this.write((0,log_common_1.assignSeverityToEntries)(entry,"INFO"),options)}notice(entry,options){return this.write((0,log_common_1.assignSeverityToEntries)(entry,"NOTICE"),options)}warning(entry,options){return this.write((0,log_common_1.assignSeverityToEntries)(entry,"WARNING"),options)}async write(entry,opts){const isInfoAdded=(0,instrumentation_1.getInstrumentationInfoStatus)();const options=opts?opts:{};if(!isInfoAdded){options.partialSuccess=true}await this.logging.setProjectId();this.formattedName_=(0,log_common_1.formatLogName)(this.logging.projectId,this.name);const resource=await this.getOrSetResource(options);const decoratedEntries=this.decorateEntries((0,instrumentation_1.populateInstrumentationInfo)(entry));this.truncateEntries(decoratedEntries);const reqOpts=extend({logName:this.formattedName_,entries:decoratedEntries,resource:resource},options);delete reqOpts.gaxOptions;return this.logging.loggingService.writeLogEntries(reqOpts,options.gaxOptions,this.defaultWriteDeleteCallback)}async getOrSetResource(options){if(options.resource){if(options.resource.labels)(0,log_common_1.snakecaseKeys)(options.resource.labels);return options.resource}await this.logging.setDetectedResource();return this.logging.detectedResource}decorateEntries(entries){return entries.map(entry=>{if(!(entry instanceof entry_1.Entry)){entry=this.entry(entry)}return entry.toJSON({removeCircular:this.removeCircular_},this.logging.projectId)})}truncateEntries(entries){return entries.forEach(entry=>{if(this.maxEntrySize===undefined)return;const payloadSize=JSON.stringify(entry).length;if(payloadSize<this.maxEntrySize)return;let delta=payloadSize-this.maxEntrySize;if(entry.textPayload){entry.textPayload=entry.textPayload.slice(0,Math.max(entry.textPayload.length-delta,0))}else{for(const field of this.jsonFieldsToTruncate){const msg=dotProp.get(entry,field,"");if(msg!==null&&msg!==undefined&&msg!==""){dotProp.set(entry,field,msg.slice(0,Math.max(msg.length-delta,0)));delta-=Math.min(msg.length,delta);if(delta<=0){break}}}}})}static assignSeverityToEntries_(entries,severity){return(0,log_common_1.assignSeverityToEntries)(entries,severity)}static formatName_(projectId,name){return(0,log_common_1.formatLogName)(projectId,name)}}exports.Log=Log;(0,promisify_1.callbackifyAll)(Log,{exclude:["entry","getEntriesStream"]});
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.Log=void 0;const promisify_1=require("@google-cloud/promisify");const dotProp=require("dot-prop");const extend=require("extend");const entry_1=require("./entry");const instrumentation_1=require("./utils/instrumentation");const log_common_1=require("./utils/log-common");class Log{constructor(logging,name,options){options=options||{};this.formattedName_=(0,log_common_1.formatLogName)(logging.projectId,name);this.removeCircular_=options.removeCircular===true;this.maxEntrySize=options.maxEntrySize;this.logging=logging;this.name=this.formattedName_.split("/").pop();this.jsonFieldsToTruncate=["jsonPayload.fields.metadata.structValue.fields.stack.stringValue","jsonPayload.fields.msg.stringValue","jsonPayload.fields.err.structValue.fields.stack.stringValue","jsonPayload.fields.err.structValue.fields.message.stringValue","jsonPayload.fields.message.stringValue"];if(options.jsonFieldsToTruncate!==null&&options.jsonFieldsToTruncate!==undefined){const filteredList=options.jsonFieldsToTruncate.filter(str=>str!==null&&!this.jsonFieldsToTruncate.includes(str)&&str.startsWith("jsonPayload"));const uniqueSet=new Set(filteredList);this.jsonFieldsToTruncate=Array.from(uniqueSet).concat(this.jsonFieldsToTruncate)}this.defaultWriteDeleteCallback=options.defaultWriteDeleteCallback}alert(entry,options){return this.write((0,log_common_1.assignSeverityToEntries)(entry,"ALERT"),options)}critical(entry,options){return this.write((0,log_common_1.assignSeverityToEntries)(entry,"CRITICAL"),options)}debug(entry,options){return this.write((0,log_common_1.assignSeverityToEntries)(entry,"DEBUG"),options)}async delete(gaxOptions){const projectId=await this.logging.auth.getProjectId();this.formattedName_=(0,log_common_1.formatLogName)(projectId,this.name);const reqOpts={logName:this.formattedName_};return this.logging.loggingService.deleteLog(reqOpts,gaxOptions,this.defaultWriteDeleteCallback)}emergency(entry,options){return this.write((0,log_common_1.assignSeverityToEntries)(entry,"EMERGENCY"),options)}entry(metadataOrData,data){let metadata;if(!data&&metadataOrData!==null&&Object.prototype.hasOwnProperty.call(metadataOrData,"httpRequest")){metadata=metadataOrData;data={}}else if(!data){data=metadataOrData;metadata={}}else{metadata=metadataOrData}return this.logging.entry(metadata,data)}error(entry,options){return this.write((0,log_common_1.assignSeverityToEntries)(entry,"ERROR"),options)}async getEntries(opts){const options=extend({},opts);const projectId=await this.logging.auth.getProjectId();this.formattedName_=(0,log_common_1.formatLogName)(projectId,this.name);if(options.filter&&!options.filter.includes("logName=")){options.filter=`(${options.filter}) AND logName="${this.formattedName_}"`}else if(!options.filter){options.filter=`logName="${this.formattedName_}"`}return this.logging.getEntries(options)}getEntriesStream(options){options=extend({log:this.name},options);return this.logging.getEntriesStream(options)}tailEntries(options){options=extend({log:this.name},options);return this.logging.tailEntries(options)}info(entry,options){return this.write((0,log_common_1.assignSeverityToEntries)(entry,"INFO"),options)}notice(entry,options){return this.write((0,log_common_1.assignSeverityToEntries)(entry,"NOTICE"),options)}warning(entry,options){return this.write((0,log_common_1.assignSeverityToEntries)(entry,"WARNING"),options)}async write(entry,opts){const options=opts?opts:{};await this.logging.setProjectId();this.formattedName_=(0,log_common_1.formatLogName)(this.logging.projectId,this.name);const resource=await this.getOrSetResource(options);const info=(0,instrumentation_1.populateInstrumentationInfo)(entry);const decoratedEntries=this.decorateEntries(info[0]);if(info[1]){options.partialSuccess=true}this.truncateEntries(decoratedEntries);const reqOpts=extend({logName:this.formattedName_,entries:decoratedEntries,resource:resource},options);delete reqOpts.gaxOptions;return this.logging.loggingService.writeLogEntries(reqOpts,options.gaxOptions,this.defaultWriteDeleteCallback)}async getOrSetResource(options){if(options.resource){if(options.resource.labels)(0,log_common_1.snakecaseKeys)(options.resource.labels);return options.resource}await this.logging.setDetectedResource();return this.logging.detectedResource}decorateEntries(entries){return entries.map(entry=>{if(!(entry instanceof entry_1.Entry)){entry=this.entry(entry)}return entry.toJSON({removeCircular:this.removeCircular_},this.logging.projectId)})}truncateEntries(entries){return entries.forEach(entry=>{if(this.maxEntrySize===undefined)return;const payloadSize=JSON.stringify(entry).length;if(payloadSize<this.maxEntrySize)return;let delta=payloadSize-this.maxEntrySize;if(entry.textPayload){entry.textPayload=entry.textPayload.slice(0,Math.max(entry.textPayload.length-delta,0))}else{for(const field of this.jsonFieldsToTruncate){const msg=dotProp.get(entry,field,"");if(msg!==null&&msg!==undefined&&msg!==""){dotProp.set(entry,field,msg.slice(0,Math.max(msg.length-delta,0)));delta-=Math.min(msg.length,delta);if(delta<=0){break}}}}})}static assignSeverityToEntries_(entries,severity){return(0,log_common_1.assignSeverityToEntries)(entries,severity)}static formatName_(projectId,name){return(0,log_common_1.formatLogName)(projectId,name)}}exports.Log=Log;(0,promisify_1.callbackifyAll)(Log,{exclude:["entry","getEntriesStream"]});
//# sourceMappingURL=log.js.map

@@ -25,12 +25,8 @@ /*!

/**
* This method returns the status if instrumentation info was already added or not.
* @returns true if the log record with instrumentation info was already added, false otherwise.
*/
export declare function getInstrumentationInfoStatus(): any;
/**
* This method helps to populate entries with instrumentation data
* @param entry {Entry} The entry or array of entries to be populated with instrumentation info
* @returns {Entry} Array of entries which contains an entry with current library instrumentation info
* @returns [Entry[], boolean] Array of entries which contains an entry with current library
* instrumentation info and boolean flag indicating if instrumentation was added or not in this call
*/
export declare function populateInstrumentationInfo(entry: Entry | Entry[]): Entry[];
export declare function populateInstrumentationInfo(entry: Entry | Entry[]): [Entry[], boolean];
/**

@@ -51,4 +47,6 @@ * The helper method to generate a log entry with diagnostic instrumentation data.

/**
* The helper method used to reset a status of a flag which indicates if instrumentation info already written or not.
* The helper method used to set a status of a flag which indicates if instrumentation info already written or not.
* @param value {boolean} The value to be set.
* @returns The value of the flag before it is set.
*/
export declare function resetInstrumentationStatus(): void;
export declare function setInstrumentationStatus(value: boolean): any;

@@ -1,2 +0,2 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.resetInstrumentationStatus=exports.getNodejsLibraryVersion=exports.createDiagnosticEntry=exports.populateInstrumentationInfo=exports.getInstrumentationInfoStatus=exports.NODEJS_LIBRARY_NAME_PREFIX=exports.INSTRUMENTATION_SOURCE_KEY=exports.DIAGNOSTIC_INFO_KEY=void 0;const arrify=require("arrify");const path=require("path");const protos_1=require("../../protos/protos");const entry_1=require("../entry");global.instrumentationAdded=false;let libraryVersion;const maxDiagnosticValueLen=14;exports.DIAGNOSTIC_INFO_KEY="logging.googleapis.com/diagnostic";exports.INSTRUMENTATION_SOURCE_KEY="instrumentation_source";exports.NODEJS_LIBRARY_NAME_PREFIX="nodejs";function getInstrumentationInfoStatus(){return global.instrumentationAdded}exports.getInstrumentationInfoStatus=getInstrumentationInfoStatus;function populateInstrumentationInfo(entry){var _a,_b;let isWritten=global.instrumentationAdded;global.instrumentationAdded=true;const entries=[];if(entry){for(const entryItem of arrify(entry)){if(entryItem){const info=(_b=(_a=entryItem.data)===null||_a===void 0?void 0:_a[exports.DIAGNOSTIC_INFO_KEY])===null||_b===void 0?void 0:_b[exports.INSTRUMENTATION_SOURCE_KEY];if(info){entryItem.data[exports.DIAGNOSTIC_INFO_KEY][exports.INSTRUMENTATION_SOURCE_KEY]=validateAndUpdateInstrumentation(info);isWritten=true}entries.push(entryItem)}}}if(!isWritten){entries.push(createDiagnosticEntry(undefined,undefined))}return entries}exports.populateInstrumentationInfo=populateInstrumentationInfo;function createDiagnosticEntry(libraryName,libraryVersion){if(!libraryName||!libraryName.startsWith(exports.NODEJS_LIBRARY_NAME_PREFIX)){libraryName=exports.NODEJS_LIBRARY_NAME_PREFIX}const entry=new entry_1.Entry({severity:protos_1.google.logging.type.LogSeverity.INFO},{[exports.DIAGNOSTIC_INFO_KEY]:{[exports.INSTRUMENTATION_SOURCE_KEY]:[{name:truncateValue(libraryName,maxDiagnosticValueLen),version:truncateValue(libraryVersion!==null&&libraryVersion!==void 0?libraryVersion:getNodejsLibraryVersion(),maxDiagnosticValueLen)}]}});return entry}exports.createDiagnosticEntry=createDiagnosticEntry;function validateAndUpdateInstrumentation(infoList){const finalInfo=[];finalInfo.push({name:exports.NODEJS_LIBRARY_NAME_PREFIX,version:getNodejsLibraryVersion()});let count=1;for(const info of infoList){if(isValidInfo(info)){finalInfo.push({name:truncateValue(info.name,maxDiagnosticValueLen),version:truncateValue(info.version,maxDiagnosticValueLen)})}if(++count===3)break}return finalInfo}function truncateValue(value,maxLen){if(value&&value.length>maxLen){return value.substring(0,maxLen).concat("*")}return value}function getNodejsLibraryVersion(){if(libraryVersion){return libraryVersion}libraryVersion=require(path.resolve(__dirname,"../../../","package.json")).version;return libraryVersion}exports.getNodejsLibraryVersion=getNodejsLibraryVersion;function isValidInfo(info){if(!info||!info.name||!info.version||!info.name.startsWith(exports.NODEJS_LIBRARY_NAME_PREFIX)){return false}return true}function resetInstrumentationStatus(){global.instrumentationAdded=false}exports.resetInstrumentationStatus=resetInstrumentationStatus;
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.setInstrumentationStatus=exports.getNodejsLibraryVersion=exports.createDiagnosticEntry=exports.populateInstrumentationInfo=exports.NODEJS_LIBRARY_NAME_PREFIX=exports.INSTRUMENTATION_SOURCE_KEY=exports.DIAGNOSTIC_INFO_KEY=void 0;const arrify=require("arrify");const path=require("path");const protos_1=require("../../protos/protos");const entry_1=require("../entry");global.instrumentationAdded=false;let libraryVersion;const maxDiagnosticValueLen=14;exports.DIAGNOSTIC_INFO_KEY="logging.googleapis.com/diagnostic";exports.INSTRUMENTATION_SOURCE_KEY="instrumentation_source";exports.NODEJS_LIBRARY_NAME_PREFIX="nodejs";function populateInstrumentationInfo(entry){var _a,_b;let isWritten=setInstrumentationStatus(true);let isInfoAdded=false;const entries=[];if(entry){for(const entryItem of arrify(entry)){if(entryItem){const info=(_b=(_a=entryItem.data)===null||_a===void 0?void 0:_a[exports.DIAGNOSTIC_INFO_KEY])===null||_b===void 0?void 0:_b[exports.INSTRUMENTATION_SOURCE_KEY];if(info){entryItem.data[exports.DIAGNOSTIC_INFO_KEY][exports.INSTRUMENTATION_SOURCE_KEY]=validateAndUpdateInstrumentation(info);isInfoAdded=isWritten=true}entries.push(entryItem)}}}if(!isWritten){entries.push(createDiagnosticEntry(undefined,undefined));isInfoAdded=true}return[entries,isInfoAdded]}exports.populateInstrumentationInfo=populateInstrumentationInfo;function createDiagnosticEntry(libraryName,libraryVersion){if(!libraryName||!libraryName.startsWith(exports.NODEJS_LIBRARY_NAME_PREFIX)){libraryName=exports.NODEJS_LIBRARY_NAME_PREFIX}const entry=new entry_1.Entry({severity:protos_1.google.logging.type.LogSeverity.INFO},{[exports.DIAGNOSTIC_INFO_KEY]:{[exports.INSTRUMENTATION_SOURCE_KEY]:[{name:truncateValue(libraryName,maxDiagnosticValueLen),version:truncateValue(libraryVersion!==null&&libraryVersion!==void 0?libraryVersion:getNodejsLibraryVersion(),maxDiagnosticValueLen)}]}});return entry}exports.createDiagnosticEntry=createDiagnosticEntry;function validateAndUpdateInstrumentation(infoList){const finalInfo=[];finalInfo.push({name:exports.NODEJS_LIBRARY_NAME_PREFIX,version:getNodejsLibraryVersion()});let count=1;for(const info of infoList){if(isValidInfo(info)){finalInfo.push({name:truncateValue(info.name,maxDiagnosticValueLen),version:truncateValue(info.version,maxDiagnosticValueLen)})}if(++count===3)break}return finalInfo}function truncateValue(value,maxLen){if(value&&value.length>maxLen){return value.substring(0,maxLen).concat("*")}return value}function getNodejsLibraryVersion(){if(libraryVersion){return libraryVersion}libraryVersion=require(path.resolve(__dirname,"../../../","package.json")).version;return libraryVersion}exports.getNodejsLibraryVersion=getNodejsLibraryVersion;function isValidInfo(info){if(!info||!info.name||!info.version||!info.name.startsWith(exports.NODEJS_LIBRARY_NAME_PREFIX)){return false}return true}function setInstrumentationStatus(value){const status=global.instrumentationAdded;global.instrumentationAdded=value;return status}exports.setInstrumentationStatus=setInstrumentationStatus;
//# sourceMappingURL=instrumentation.js.map
{
"name": "@google-cloud/logging-min",
"version": "10.0.0",
"version": "10.0.1",
"description": "Stackdriver Logging Client Library for Node.js",

@@ -49,3 +49,3 @@ "keywords": [

"@google-cloud/common": "^3.4.1",
"@google-cloud/paginator": "^3.0.0",
"@google-cloud/paginator": "^4.0.0",
"@google-cloud/projectify": "^2.0.0",

@@ -52,0 +52,0 @@ "@google-cloud/promisify": "^3.0.0",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc