# serverless-logging-config

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

Latest version **1.0.2** (published 2024-01-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install serverless-logging-config
pnpm add serverless-logging-config
yarn add serverless-logging-config
bun add serverless-logging-config
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2024-01-05 |
| First published | 2023-11-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 693.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 18 |
| Author | Yan Cui |
| Maintainers | theburningmonk |

## Links

- npm: https://www.npmjs.com/package/serverless-logging-config
- Repository: https://github.com/theburningmonk/serverless-logging-config
- Homepage: https://github.com/theburningmonk/serverless-logging-config#readme
- Issues: https://github.com/theburningmonk/serverless-logging-config/issues
- npm.io page: https://npm.io/package/serverless-logging-config

## Recent versions

- 1.0.2 (latest) — 2024-01-05
- 1.0.1 — 2024-01-05
- 1.0.0 — 2023-11-27
- 0.1.2 — 2023-11-24
- 0.1.1 — 2023-11-23
- 0.1.0 — 2023-11-23

## README

# 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](https://aws.amazon.com/about-aws/whats-new/2023/11/aws-lambda-controls-search-filter-aggregate-lambda-function-logs)

## Getting started

1. Install as dev dependency:

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

2. Add the plugin to the plugins list in your `serverless.yml`:

```yml
service: my-service

plugins:
  - serverless-logging-config
```

3. Configure the plugin in the `custom` section (you may have to add this to your `serverless.yml`). For example:

```yml
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](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-loggingconfig.html) 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.

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

---
_Source: https://npm.io/package/serverless-logging-config · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
