# wjc-log-patch

> Simple NodeJS console log patcher. Adds timestamp to all log messages and makes it possible to silent any level of log - info, log, warn, error (or do a total log mute)

Latest version **0.0.3** (published 2016-05-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install wjc-log-patch
pnpm add wjc-log-patch
yarn add wjc-log-patch
bun add wjc-log-patch
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2016-05-17 |
| First published | 2016-05-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | statyan |
| Maintainers | statyan |

## Links

- npm: https://www.npmjs.com/package/wjc-log-patch
- npm.io page: https://npm.io/package/wjc-log-patch

## Recent versions

- 0.0.3 (latest) — 2016-05-17
- 0.0.2 — 2016-05-17
- 0.0.1 — 2016-05-16

## README

# wjc-log-patch

Patches console logging method to add some useful functions to standard logger.

- adds timestamp to all log messages
- adds message log level mark
- gives an opportunity to mute any log level or all of them

Available log levels are info, log, warn, error.

Extremly useful for tests. Include 'wjc-log-patch' at the top of the first test spec and call `require('wjc-log-patch').mute()` to suppress your code log messages so you console test report would not be breaked logs of your code.

### Usage example

```
var logger = require('wjc-log-patch');

// mute INFO level
logger.levels.info = false;

// mute all log levels
logger.mute()

// unmute ERROR level
logger.levels.error = true;

// unmute all levels
logger.unmute()


```
##Whats new

v0.0.3:
- Fixed missed import of util module
v0.0.2:
- Fixed converting object to strings to display in log

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