# loggingtofile

> Logging to a file.

Latest version **0.0.2** (published 2014-02-20) · BSD-2-Clause license · 0 weekly downloads

## Install

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

## 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.2 |
| Published | 2014-02-20 |
| First published | 2014-02-20 |
| Weekly downloads | 0 |
| License | BSD-2-Clause |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Matthew Palmer |
| Maintainers | mp |
| Keywords | log, file, loggintofile, file, logger, file, log, log, file |

## Links

- npm: https://www.npmjs.com/package/loggingtofile
- Repository: https://github.com/matthewpalmer/loggingtofile
- Issues: https://github.com/matthewpalmer/loggingtofile/issues
- npm.io page: https://npm.io/package/loggingtofile

## 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.0.2 (latest) — 2014-02-20
- 0.0.0 — 2014-02-20

## README

# loggingtofile
An easy way to log to a file. Makes it very easy to override console.log(). I hope to add support for different structures, e.g. HTML lists, Markdown, csv, tables, etc. Suggestions are welcome.

## Installation

```js
npm install loggingtofile
```

## Usage

```js
var Loggingtofile = require('Loggingtofile');

// Instantiate. Tell the module the path of your log file.
var logger = new Loggingtofile('output.txt');

// Log to the file 'output.txt'
logger.log('This is a log message.');

// Override console.log
console.log = logger.log;

// Will be logged to the 'output.txt' file
console.log('This is a console.log message.');
```

**Output**

```
Thu Feb 20 2014 18:05:08 GMT+1100 (EST): This is a log message.
Thu Feb 20 2014 18:05:08 GMT+1100 (EST): This is a console.log message
```

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