# feathers-logger

> Simple logging for feathers

Latest version **0.3.2** (published 2018-06-03) · 0 weekly downloads

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

## Install

```sh
npm install feathers-logger
pnpm add feathers-logger
yarn add feathers-logger
bun add feathers-logger
```

## Health

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

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.3.2 |
| Published | 2018-06-03 |
| First published | 2014-07-05 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 6 |
| Dependencies | 1 |
| Unpacked size | 12.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 22 |
| Author | Feathers contributors |
| Maintainers | daffl, ekryski, marshallswain |
| Keywords | feathers-plugin, feathers, logger, logging |

## Links

- npm: https://www.npmjs.com/package/feathers-logger
- Repository: https://github.com/feathersjs-ecosystem/feathers-logger
- Issues: https://github.com/feathersjs-ecosystem/feathers-logger/issues
- npm.io page: https://npm.io/package/feathers-logger

## Dependencies (1)

- [uberproto](https://npm.io/package/uberproto.md) ^2.0.0

## Alternatives

- [cli-color](https://npm.io/package/cli-color.md) — 3.4M weekly downloads
- [log](https://npm.io/package/log.md) — 1.3M weekly downloads
- [logstash-client](https://npm.io/package/logstash-client.md) — 4.5K weekly downloads
- [@nocobase/plugin-logger](https://npm.io/package/@nocobase/plugin-logger.md) — 2.0K weekly downloads
- [child-process-debug](https://npm.io/package/child-process-debug.md) — 695 weekly downloads

## Recent versions

- 0.3.2 (latest) — 2018-06-03
- 0.3.1 — 2018-05-16
- 0.3.0 — 2018-04-25
- 0.2.3 — 2017-04-13
- 0.2.2 — 2016-04-21
- 0.2.1 — 2016-04-21
- 0.2.0 — 2016-04-21
- 0.1.3 — 2014-07-05
- 0.1.2 — 2014-07-05
- 0.1.1 — 2014-07-05
- 0.1.0 — 2014-07-05

## README

# feathers-logger 

[![Greenkeeper badge](https://badges.greenkeeper.io/feathersjs-ecosystem/feathers-logger.svg)](https://greenkeeper.io/)

[![Build Status](https://secure.travis-ci.org/feathersjs-ecosystem/feathers-logger.png?branch=master)](http://travis-ci.org/feathersjs-ecosystem/feathers-logger)
[![Dependency Status](https://img.shields.io/david/feathersjs-ecosystem/feathers-logger.svg?style=flat-square)](https://david-dm.org/feathersjs-ecosystem/feathers-logger)
[![Download Status](https://img.shields.io/npm/dm/feathers-logger.svg?style=flat-square)](https://www.npmjs.com/package/feathers-logger)
[![Slack Status](http://slack.feathersjs.com/badge.svg)](http://slack.feathersjs.com)

> Logging mixin for a Feathers app.

## Getting Started

Install the module with: `npm install feathers-logger --save`

```js
var feathers = require('feathers');
var logger = require('feathers-logger');

var app = feathers()
  .configure(logger())
  .use('/users', userService);
```

## Documentation

`Feathers-logger` is just a simple wrapper for any logger so that you can conveniently do `app.log()`. There are 4 methods provided for you to use:

* `app.log()`
* `app.info()`
* `app.warn()`
* `app.error()`
* `app.debug()`

They have graceful fallback to the [core nodejs console methods](http://nodejs.org/api/stdio.html).

#### Vanilla Usage

```js
var feathers = require('feathers');
var logger = require('feathers-logger');
var memory = require('feathers-memory');

var app = feathers()
    .configure(logger())
    .use('/users', memory);

app.log('Server Started');
```

#### Using With [Winston](https://github.com/flatiron/winston)

```js
var winston = require('winston');
var feathers = require('feathers');
var logger = require('feathers-logger');
var memory = require('feathers-memory');

var app = feathers()
    .configure(logger(winston))
    .use('/users', memory);

app.log('Server Started');
```

#### Using With [Morgan](https://github.com/expressjs/morgan)

```js
var morgan = require('morgan');
var feathers = require('feathers');
var logger = require('feathers-logger');
var memory = require('feathers-memory');

var app = feathers()
    .configure(logger(morgan({
      format: 'dev'
    })))
    .use('/users', memory);

app.log('Server Started');
```

## Examples
See [example directory](https://github.com/feathersjs-ecosystem/feathers-logger/tree/master/example).

## Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using the `npm test`.

## Release History

__0.2.0__

- cleans up a bunch of stuff
- makes plugin consistent with other plugins
- upgrades to latest uberproto
- removes feathers as peer dependency
- removes gulp from the equation
- tests against feathers 2

__0.1.0__

- Initial release
- Vanilla logging support
- Added documentation & example
- Support for Winston logger
- Support for Morgan logger

## License

Copyright (c) 2018

Licensed under the [MIT license](https://github.com/feathersjs-ecosystem/feathers-logger/blob/master/LICENSE-MIT).

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