@adobe/contentlake-shared-logger

1.0.3 • Public • Published

Content Lake Shared - Logger

Custom logger for formatting logs in Coralogix for Asset Catalog

This is one of the Content Lake Shared libraries.

Status

GitHub license

Usage

Install using:

npm install @adobe/contentlake-shared-logger

Use logger (a wrapper function) with Helix Services:

import { logger } from '@adobe/contentlake-shared-logger';

function run(request, context) {
  context.log.setStep('dispatch');
  context.log.info('Lambda started');
  // log will look like:
  // JOB: a5d7813b-3e82-4b95-9b1f-75e3d0e300af REQ: 44dcc2df-010c-4a47-b7ee-87883a525175 STEP: dispatch MESSAGE: Lambda started
  return new Response('Lambda started');
}

export const main = wrap(run)
  .with(logger)
  .with(status);

Readme

Keywords

none

Package Sidebar

Install

npm i @adobe/contentlake-shared-logger

Weekly Downloads

6

Version

1.0.3

License

Apache-2.0

Unpacked Size

22 kB

Total Files

5

Last publish

Collaborators

  • stopp-adobe
  • dylandepass
  • djaeggi
  • adobehalls
  • fullcolorcoder
  • marbec
  • tripod
  • garthdb
  • lazd
  • adobe-admin
  • patrickfulton
  • trieloff
  • shazron
  • krisnye
  • dcpfsdk
  • natebaldwin
  • devongovett
  • aspro83
  • symanovi
  • dpfister
  • stefan-guggisberg
  • korra
  • rofe
  • kptdobe