# @zaneray/express-logging

> Seller of the Product

Latest version **1.3.1** (published 2022-02-10) · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @zaneray/express-logging
pnpm add @zaneray/express-logging
yarn add @zaneray/express-logging
bun add @zaneray/express-logging
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.3.1 |
| Published | 2022-02-10 |
| First published | 2019-12-13 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 45.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | The ZaneRay Group |
| Maintainers | jeszaneray, mtshane, jermartin77, deanzaneray, tyler.furry, jonkofal, zaneray-bitbucket, zr_doug, mdmullendore, trzr, nicoleoldow, f1ux1uxday, hlongen, emilyduttinger, floskyland |

## Links

- npm: https://www.npmjs.com/package/@zaneray/express-logging
- npm.io page: https://npm.io/package/@zaneray/express-logging

## Dependencies (3)

- [yarn](https://npm.io/package/yarn.md) ^1.22.10
- [winston](https://npm.io/package/winston.md) ^3.3.3
- [@google-cloud/logging-winston](https://npm.io/package/@google-cloud/logging-winston.md) ^4.1.0

## Recent versions

- 1.3.1 (latest) — 2022-02-10
- 1.3.0 — 2021-07-20
- 1.2.0 — 2020-11-15
- 1.1.0 — 2020-01-22
- 1.0.1 — 2020-01-22
- 1.0.0 — 2020-01-07
- 0.0.11 — 2019-12-18
- 0.0.10 — 2019-12-18
- 0.0.9 — 2019-12-17
- 0.0.8 — 2019-12-17
- 0.0.7 — 2019-12-16
- 0.0.6 — 2019-12-16
- 0.0.5 — 2019-12-16
- 0.0.4 — 2019-12-13
- 0.0.3 — 2019-12-13
- … 2 more at https://npm.io/package/@zaneray/express-logging/versions

## README

# ZaneRay Express Logging
- A wrapper around Winston
- Supports logging to Google StackDriver for deployed applications
 
## Definitions

### Environments
- development
- test
- staging
- prod

### Transports (transports.js)

- defines where to log in each Environment

### Options (options.js)

- defines how to log in each Environment

### Log Levels - from Winston
- 0: error
- 1: warn
- 2: info
- 3: verbose
- 4: debug
- 5: silly
  
 ## Usage (see test/loggingTest.js)

in your environment
```
npm install --save @zaneray/express-logging
```
in your code.js

```
const logging = require("@zaneray/express-logging");

// set process.env.NODE_ENV in the runtime
// logger level and output method is determined by environment (see transports.js and options.js)
const logger = logging.create();

// Writes some log entries
logger.info("here's some information");
logger.warn("something might be wrong");
logger.error("something is wrong, seriously");

//change log level to log warn and above
logging.setLevel("warn");
//show the current level
logger.warn(logging.getLevel());

// Writes some log entries
logger.info("here's some information");
logger.warn("something might be wrong");
logger.error("something is wrong, seriously");
```

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