# simple-log-tee

> Log, and write to, multiple streams at the same time.

Latest version **0.2.2** (published 2014-12-22) · ISC license · 0 weekly downloads

## Install

```sh
npm install simple-log-tee
pnpm add simple-log-tee
yarn add simple-log-tee
bun add simple-log-tee
```

## 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.2.2 |
| Published | 2014-12-22 |
| First published | 2014-12-19 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Sean P Kennedy |
| Maintainers | seanpkps |
| Keywords | tee, log, record, log, file, pipe |

## Links

- npm: https://www.npmjs.com/package/simple-log-tee
- Repository: git@github.com:PointSource/simple-log-tee
- Homepage: https://github.com/PointSource/simple-log-tee
- Issues: https://github.com/PointSource/simple-log-tee/issues
- npm.io page: https://npm.io/package/simple-log-tee

## 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.2.2 (latest) — 2014-12-22
- 0.2.1 — 2014-12-22
- 0.2.0 — 2014-12-22
- 0.1.3 — 2014-12-19
- 0.1.2 — 2014-12-19
- 0.1.1 — 2014-12-19
- 0.1.0 — 2014-12-19

## README

# simple-log-tee

Log, and write, to multiple streams at the same time.

This is really handy for logging output to the console and to a file at the same time.

## usage

```javascript
var stee = require('simple-log-tee');

var doubleStd = stee.createLogTee([process.stdout, process.stderr]);
doubleStd.log('Double the fun?');
doubleStd.write(' ... ');
doubleStd.log('Maybe not.');

stee.teeToStdoutOnly().log('That\'s better.');
stee.teeToNowhere().write('But this is going nowhere!');

var dualRecorder = stee.createLogFileTee('test.log');
dualRecorder.log('Writing to "%s" and stdout.', dualRecorder.logfile);

var fileOnly = stee.createLogFileTee('t2.log', null);
fileOnly.write('one line, only in ' + fileOnly.logfile);
```

**Note:** as of version 0.2.0, the API has been changed to no longer export classes that you create with `new`, but functions that create the objects for you.  
Replace `new stee.LogTee([stream1, stream2, stream3])` with `stee.createLogTee([stream1, stream2, stream3])`.  
Replace `new stee.LogFileTee('my.log')` with `stee.createLogFileTee('my.log')`.

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