# daily-file-writer

> Write data to a log file using the date as the filename. Handles date rollover too!

Latest version **1.0.1** (published 2016-04-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install daily-file-writer
pnpm add daily-file-writer
yarn add daily-file-writer
bun add daily-file-writer
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2016-04-26 |
| First published | 2016-03-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Evan Lucas |
| Maintainers | evanlucas |

## Links

- npm: https://www.npmjs.com/package/daily-file-writer
- Repository: https://github.com/evanlucas/daily-file-writer
- Issues: https://github.com/evanlucas/daily-file-writer/issues
- npm.io page: https://npm.io/package/daily-file-writer

## Dependencies (1)

- [mkdirp](https://npm.io/package/mkdirp.md) ~0.5.1

## Recent versions

- 1.0.1 (latest) — 2016-04-26
- 1.0.0 — 2016-03-30

## README

# daily-file-writer

[![Build Status](https://travis-ci.org/evanlucas/daily-file-writer.svg)](https://travis-ci.org/evanlucas/daily-file-writer)
[![Coverage Status](https://coveralls.io/repos/evanlucas/daily-file-writer/badge.svg?branch=master&service=github)](https://coveralls.io/github/evanlucas/daily-file-writer?branch=master)

Write data to a log file using the date as the filename. Handles date rollover too!

**Note: Requires Node.js v4+**

## Install

```bash
$ npm install [--save] daily-file-writer
```

## Test

```bash
$ npm test
```

## Usage

```js
'use strict'

const Writer = require('daily-file-writer')
const writer = new Writer({
  path: '/tmp/logs'
})

writer.write('blah blah')

// the log file will be something like:
// /tmp/logs/2016-01-02.txt

// when a write comes in and the date has changed,
// the previous file will be closed and the data will be written to a new file
// /tmp/logs/2016-01-03.txt
```

## Author

Evan Lucas

## License

MIT (See `LICENSE` for more info)

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