1.0.7 • Published 3 years ago

@houseid/gcp-logging-helper v1.0.7

Weekly downloads
-
License
GPLV3
Repository
-
Last release
3 years ago

@houseid/gcp-logging-helper

Example:

// Initialize:
const { createLogger } = require('@houseid/gcp-logging-helper')({
  projectId: () => process.env.CLOUD_PROJECT_ID,
  sourceReference: () => ({
    repository: 'https://github.com/House-ID/gcp-logging-helper',
    revisionId: process.env.GIT_COMMIT_SHA // set GIT_COMMIT_SHA=$COMMIT_SHA in Cloud Build
  }),
  serviceContext: () => ({ resourceType: 'cloud_run_revision' }),
  initialData: req => ({
    req: {
      params: req.params,
      query: req.query
    }
  })
});

// In API:
const logger = createLogger(req);
1.0.7

3 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.3

4 years ago

1.0.1

4 years ago