# wuhalog

> Wuha logging library for Node applications.

Latest version **1.5.4** (published 2018-05-16) · ISC license · 0 weekly downloads

## Install

```sh
npm install wuhalog
pnpm add wuhalog
yarn add wuhalog
bun add wuhalog
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.5.4 |
| Published | 2018-05-16 |
| First published | 2018-01-31 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 10 |
| Unpacked size | 17 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Wuha |
| Maintainers | stevenwuha |

## Links

- npm: https://www.npmjs.com/package/wuhalog
- npm.io page: https://npm.io/package/wuhalog

## Dependencies (10)

- [mysql](https://npm.io/package/mysql.md) ^2.15.0
- [moment](https://npm.io/package/moment.md) ^2.20.1
- [winston](https://npm.io/package/winston.md) ^2.4.0
- [useragent](https://npm.io/package/useragent.md) ^2.3.0
- [@types/mysql](https://npm.io/package/@types/mysql.md) ^2.15.2
- [@types/express](https://npm.io/package/@types/express.md) ^4.11.0
- [@types/winston](https://npm.io/package/@types/winston.md) ^2.3.7
- [@types/useragent](https://npm.io/package/@types/useragent.md) ^2.1.1
- [winston-transport](https://npm.io/package/winston-transport.md) ^3.0.1
- [@google-cloud/pubsub](https://npm.io/package/@google-cloud/pubsub.md) ^0.16.2

## Recent versions

- 1.5.4 (latest) — 2018-05-16
- 1.5.3 — 2018-02-16
- 1.5.2 — 2018-02-09
- 1.5.1 — 2018-02-08
- 1.5.0 — 2018-02-08
- 1.4.3 — 2018-02-08
- 1.4.2 — 2018-02-06
- 1.4.1 — 2018-02-06
- 1.4.0 — 2018-02-06
- 1.3.0 — 2018-02-05
- 1.2.6 — 2018-02-04
- 1.2.5 — 2018-02-04
- 1.2.4 — 2018-02-04
- 1.2.3 — 2018-02-03
- 1.2.2 — 2018-02-03
- … 12 more at https://npm.io/package/wuhalog/versions

## README

# Wuha Log

Logging package for Node.js applications.

# Usage

Before it can be used, the logger needs to be initialized. This is done by calling the `initialize` function, which can be done like so:

```
import { initialize as initializeLogger } from 'wuhalog'
const log = initializeLogger({
  level: 'info'
})
```

You should do this in the first file of your Node project. Once initialize, the logger can access as the default import:

```
import log from 'wuhalog'
```

The equivalent without `import`:

```
const log = require('wuhalog').initialize({
  level: 'info'
})
```

And later:

```
const log = require('wuhalog').default
```

# Examples
Wuhalog is used in Manhattan (for ES2015 examples) and in Redirector (for TypeScript examples).

# Publishing

1. `npm login`
2. Increment version in `package.json`
3. `npm publish`

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