🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

serverless-logging-config

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

serverless-logging-config

Lets you configure custom log group, JSON logging, and other recent logging changes announce in Nov 2023.

1.0.2
latest
Version published
Maintainers
1
Created

serverless-logging-config

Lets you configure custom log group, JSON logging, and other recent logging changes announce in Nov 2023.

For more information about these settings, please see the service announcement here

Getting started

  • Install as dev dependency:

npm i --save-dev serverless-logging-config

  • Add the plugin to the plugins list in your serverless.yml:
service: my-service

plugins:
  - serverless-logging-config
  • Configure the plugin in the custom section (you may have to add this to your serverless.yml). For example:
service: my-service

custom:
  serverless-logging-config:
    enableJson: true # [Optional] if enabled, set the LogFormat to JSON
    logGroupName: my-logs # [Optional] if set, all functions will send logs this log group
    applicationLogLevel: INFO # [Optional] valid values are DEBUG, ERROR, FATAL, INFO, TRACE and WARN
    systemLogLevel: INFO # [Optional] valid values are DEBUG, INFO and WARN
    useDefaultLogGroup: # [Optional] these functions would keep logging to their default log group
      - function1
      - function2

See this page for more info on what these settings mean.

IMPORTANT: when used alongside the serverless-iam-roles-per-function plugin, make sure this plugin is listed AFTER serverless-iam-roles-per-function. ie.

plugins:
  - serverless-iam-roles-per-function
  - serverless-logging-config

FAQs

Package last updated on 05 Jan 2024

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