# log-prefix

> Prefix calls to console.log, console.warn, etc with whatever you'd like

Latest version **0.1.1** (published 2018-09-11) · 0 weekly downloads

## Install

```sh
npm install log-prefix
pnpm add log-prefix
yarn add log-prefix
bun add log-prefix
```

## 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.1.1 |
| Published | 2018-09-11 |
| First published | 2013-06-18 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | * |
| Dependencies | 0 |
| Unpacked size | 2.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 10 |
| Author | Dave Eddy |
| Maintainers | bahamas10 |
| Keywords | console, console.log, log, logger, timestamp, prefix |

## Links

- npm: https://www.npmjs.com/package/log-prefix
- Repository: https://github.com/bahamas10/node-log-prefix
- Homepage: https://github.com/bahamas10/node-log-prefix#readme
- Issues: https://github.com/bahamas10/node-log-prefix/issues
- npm.io page: https://npm.io/package/log-prefix

## 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.1.1 (latest) — 2018-09-11
- 0.1.0 — 2018-08-28
- 0.0.0 — 2013-06-18

## README

log-prefix
==========

Prefix calls to console.log, console.warn, etc with whatever you'd like

Example
-------

``` js
console.log('before log-prefix');
require('log-prefix')('==> %s <==');
console.log('after log-prefix');
```

yields

```
before log-prefix
==> after log-prefix <==
```

You can specify a function instead of a string.  The function must return a
string to be used (good for dynamic values).

``` js
require('log-prefix')(function() { return '[' + Date.now() + '] %s' });
console.log('hello %s', 'world');
```

yields

```
[1371582989993] hello world
```

Install
------

    npm install log-prefix

Tests
-----

    npm test

License
-------

MIT License

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