Socket
Book a DemoInstallSign in
Socket

@cdssnc/logdriver

Package Overview
Dependencies
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cdssnc/logdriver

CDS Log Driver

0.0.2
latest
npmnpm
Version published
Maintainers
2
Created
Source

CDS Log Driver 🇨🇦

Maintainability

Creates a standardized logging format for output + log collection.

standardPayload = {
  cloudEventsVersion: "0.2",
  contentType: "text/plain",
  data: msg,
  eventID: uuidv4(),
  eventTime: new Date().toISOString(),
  eventType: "com.github.cds-snc." + level,
  eventTypeVersion: "1.0",
  source: "/"
};

Adapters

StackDriver Node

import { Logger, StackDriverNodeLogger } from "@cdssnc/logger";
Logger.subscribe("error", StackDriverNodeLogger.log);
Logger.debug("The message from the server"); //logs to console + StackDriver

StackDriver Client

import { Logger, StackDriverClient } from "@cdssnc/logger";

StackDriverClient.init(
   "your-api-key",
   "your-project-id"
);

// window.onError should now catch and report to StackDriver
Logger.subscribe("error", StackDriverClient.log);
Logger.warn("Client side message sent to StackDriver");

FAQs

Package last updated on 04 Feb 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.