Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

serverless-logstreaming

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

serverless-logstreaming

Serverless Logstreaming Plugin - Stream logs to the loghandler function

latest
Source
npmnpm
Version
1.1.3
Version published
Maintainers
1
Created
Source

⚡️ Serverless Logstreaming Plugin

serverless npm license dependencies

About

This Serverless plugin allows for simple streaming of logs through a given function with the popular Serverless Framework and AWS Lambda.

Configuration

Currently this plugin ONLY works with the AWS provider.

  • Add serverless-logstreaming to your serverless.yml file in the root of your serverless project
plugins:
  - serverless-logstreaming
  • Define your loghandler function:
functions:
  myLogHandler:
    description: 'CW Logs handler for Tasks'
    handler: handlers/myLogHandler/handler.handler
  • Reference the name of your loghandler function in the custom section:
custom:
  logHandler:
    function: myLogHandler

And that's all it takes. Now the logs of all your lambda functions will stream through that loghandler.

If you have a function where you don't want to stream logs through the loghandler it's as simple as adding an exception:

functions:
  handlerToNotStream:
    description: 'This lambda should not stream logs'
    loghandler: false

That loghandler: false will exempt this lambda from streaming through the loghandler function.

Changelog

  • 1.1.3 - Fix several permissions bugs. Remove unnecessary logFilter.
  • 1.1.0 - Add logstreaming permission by default instead of requiring user to do so, add flexibility in naming
  • 1.0.0 - Initial commit.

Acknowledgements

  • Thanks to @andymac4182 for the gist that inspired this plugin.
  • Thanks to @HyperBrain and the @serverless team

Keywords

serverless plugin logstreaming

FAQs

Package last updated on 28 Aug 2017

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