Socket
Socket
Sign inDemoInstall

@google-cloud/logging

Package Overview
Dependencies
Maintainers
1
Versions
157
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@google-cloud/logging - npm Package Compare versions

Comparing version 10.1.7 to 10.1.8

2

build/src/entry.d.ts

@@ -47,3 +47,3 @@ /*!

httpRequest?: object;
timestamp?: string;
timestamp?: Timestamp;
[INSERT_ID_KEY]?: string;

@@ -50,0 +50,0 @@ [OPERATION_KEY]?: object;

@@ -148,8 +148,3 @@ "use strict";

if (entry.timestamp instanceof Date) {
const seconds = entry.timestamp.getTime() / 1000;
const secondsRounded = Math.floor(seconds);
entry.timestamp = {
seconds: secondsRounded,
nanos: Math.floor((seconds - secondsRounded) * 1e9),
};
entry.timestamp = (0, common_1.toNanosAndSecondsObj)(entry.timestamp);
}

@@ -226,3 +221,3 @@ else if (typeof entry.timestamp === 'string') {

if (meta.timestamp instanceof Date) {
entry.timestamp = meta.timestamp.toISOString();
entry.timestamp = (0, common_1.toNanosAndSecondsObj)(meta.timestamp);
}

@@ -229,0 +224,0 @@ // Format httprequest

@@ -122,1 +122,10 @@ /*!

};
/**
* Converts Date to nanoseconds format suported by Logging.
* See https://cloud.google.com/logging/docs/agent/logging/configuration#timestamp-processing for more details
* @param date The date to be converted to Logging nanos and seconds format
*/
export declare function toNanosAndSecondsObj(date: Date): {
seconds: number;
nanos: number;
};

@@ -18,3 +18,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.zuluToDateObj = exports.decodeValue = exports.structToObj = exports.ObjectToStructConverter = exports.objToStruct = void 0;
exports.toNanosAndSecondsObj = exports.zuluToDateObj = exports.decodeValue = exports.structToObj = exports.ObjectToStructConverter = exports.objToStruct = void 0;
function objToStruct(obj, options) {

@@ -242,2 +242,16 @@ return new ObjectToStructConverter(options).convert(obj);

exports.zuluToDateObj = zuluToDateObj;
/**
* Converts Date to nanoseconds format suported by Logging.
* See https://cloud.google.com/logging/docs/agent/logging/configuration#timestamp-processing for more details
* @param date The date to be converted to Logging nanos and seconds format
*/
function toNanosAndSecondsObj(date) {
const seconds = date.getTime() / 1000;
const secondsRounded = Math.floor(seconds);
return {
seconds: secondsRounded,
nanos: Math.floor((seconds - secondsRounded) * 1e9),
};
}
exports.toNanosAndSecondsObj = toNanosAndSecondsObj;
//# sourceMappingURL=common.js.map

@@ -21,3 +21,2 @@ "use strict";

const path = require("path");
const protos_1 = require("../../protos/protos");
const entry_1 = require("../entry");

@@ -87,5 +86,3 @@ // The global variable keeping track if instrumentation record was already written or not.

}
const entry = new entry_1.Entry({
severity: protos_1.google.logging.type.LogSeverity.INFO,
}, {
const entry = new entry_1.Entry(undefined, {
[exports.DIAGNOSTIC_INFO_KEY]: {

@@ -92,0 +89,0 @@ [exports.INSTRUMENTATION_SOURCE_KEY]: [

{
"name": "@google-cloud/logging",
"version": "10.1.7",
"version": "10.1.8",
"description": "Cloud Logging Client Library for Node.js",

@@ -5,0 +5,0 @@ "keywords": [

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