vendure-plugin-google-cloud-logger
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

Google Cloud logger Vendure Plugin

This plugin wraps the Google Cloud SDK @google-cloud/logging library and sends structured logs to the GCP logging service.

The plugin attaches the current request to each log message, and uses (Async Local Storage)[https://nodejs.org/api/async_hooks.html] under the hood - so you need at least Node 14 to run it.

This is still an experimental plugin, so no warranties and all that.

Usage

// In your vendure-config.ts file just add this plugin:
import { GoogleCloudLoggerPlugin } from 'vendure-plugin-google-cloud-logger'

export const config: VendureConfig = {
  plugins: [
    GoogleCloudLoggerPlugin.init({
      projectId: "gcp-project-id",
      resourceType: "gcp-resource-type", // e,g, cloud_run_revision
      logName: "gcp-log-name",
    }),
    ...
  ],
  ...
}

Readme

Keywords

none

Package Sidebar

Install

npm i vendure-plugin-google-cloud-logger

Weekly Downloads

1

Version

0.1.0

License

MIT

Unpacked Size

15.1 kB

Total Files

15

Last publish

Collaborators

  • skid