# @skyhookadventure/lambda-logger

> [![Built with typescript](https://badgen.net/badge/icon/typescript?icon=typescript&label)](https://www.typescriptlang.org/) [![version](https://badgen.net/npm/v/skyhook-lambda-logger)](https://www.npmjs.com/package/skyhook-lambda-logger) ![dependants](htt

Latest version **3.0.1** (published 2020-08-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install @skyhookadventure/lambda-logger
pnpm add @skyhookadventure/lambda-logger
yarn add @skyhookadventure/lambda-logger
bun add @skyhookadventure/lambda-logger
```

## 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 | 3.0.1 |
| Published | 2020-08-06 |
| First published | 2020-07-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 197.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | alan-cooney, mwycliffe |

## Links

- npm: https://www.npmjs.com/package/@skyhookadventure/lambda-logger
- npm.io page: https://npm.io/package/@skyhookadventure/lambda-logger

## Dependencies (1)

- [loglevel](https://npm.io/package/loglevel.md) ^1.6.8

## Recent versions

- 3.0.1 (latest) — 2020-08-06
- 2.0.2 — 2020-08-06
- 2.0.1 — 2020-08-06
- 2.0.0 — 2020-08-06
- 1.0.3 — 2020-07-23
- 1.0.2 — 2020-07-23
- 1.0.1 — 2020-07-23
- 1.0.0 — 2020-07-23

## README

# Skyhook Lambda Logger

[![Built with
typescript](https://badgen.net/badge/icon/typescript?icon=typescript&label)](https://www.typescriptlang.org/)
[![version](https://badgen.net/npm/v/skyhook-lambda-logger)](https://www.npmjs.com/package/skyhook-lambda-logger)
![dependants](https://badgen.net/npm/dependents/skyhook-lambda-logger) ![license](https://badgen.net/npm/license/skyhook-lambda-logger)

Exports a pre-configured [loglevel](https://www.npmjs.com/package/loglevel) logger.

## Use

```typescript
import log from '@skyhookadventure/lambda-logger';

// In descending order
log.error({ success: false });
log.warn({ success: 'maybe' });
log.info({ success: true });
log.debug({ success: true }); // Doesn't show by default

// Enable debug
process.env.LOG_LEVEL = 'debug';
```

## Guidelines

1. Don't log private data (e.g. don't log a request object if it has a username in it).
2. Focus on logging small objects that can be searched rather than strings

### Setting the output log level

By default the log level used is INFO (i.e. HTTP errors won't be shown). In (Jest) testing environments the level is set
to ERROR instead.

You can override this by setting `process.env.LOG_LEVEL`.

## Checklist

| CD Feature | Provided                                |
| ---------- | --------------------------------------- |
| ✅         | Typescript                              |
| ✅         | Linting (AirBnB + Prettier)             |
| ✅         | Unit tests (Jest)                       |
| ✅         | Coverage check (ideally 100% with Jest) |
| ✅         | Github Continuous Deployment            |

## Built by Skyhook

This module is contributed by the team at [Skyhook](https://www.skyhookadventure.com/).

---
_Source: https://npm.io/package/@skyhookadventure/lambda-logger · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
