serverless-log-funnel

0.0.1 • Public • Published

Serverless Log Funnel

Forwards log events to another fuction defined in the same serverless deploy

Usage

The following configuration in your serverless.yml

custom:
  logfunnel:
    targetfn: logHandler                # required
    enabled: true/false                 # optional, defaults to true
    filter:  '{ $.something = stuff }'  # optional, defaults to no filter and everything is forwarded

functions:
  fnA:
    handler: foo
  fnB:
    handler: bar
    logHandler:
      enabled: true/false               # optional, defaults to custom.logfunnel.enabled
      filter: '{ $.something = stuff }' # optional, defaults to custom.logfunnel.filter
  logHandler:                           # required, custom.logfunnel.targetfn should match this
    handler: myLogHandler

will configure logHandler to receive cloudwatch events from fnA and fnB

custom.logfunnel.targetfn.someFunctionName is required and must match functions.someFunctionName

Testing

npm test

Package Sidebar

Install

npm i serverless-log-funnel

Weekly Downloads

1

Version

0.0.1

License

ISC

Unpacked Size

10.5 kB

Total Files

7

Last publish

Collaborators

  • mweitzel