Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fibjs-modules/logstream
wrap a file stream as a extremely high performance log stream.
https://github.com/fibjs-modules/logstream
fibjs js log logstream npm performance stream
Last synced: about 2 months ago
JSON representation
wrap a file stream as a extremely high performance log stream.
- Host: GitHub
- URL: https://github.com/fibjs-modules/logstream
- Owner: fibjs-modules
- License: mit
- Created: 2017-04-23T03:57:39.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-06-14T08:16:16.000Z (over 7 years ago)
- Last Synced: 2024-10-31T21:05:24.999Z (2 months ago)
- Topics: fibjs, js, log, logstream, npm, performance, stream
- Language: JavaScript
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- Changelog: History.md
- License: LICENSE
Awesome Lists containing this project
- awesome - logstream - wrap a file stream as a extremely high performance log stream. (Packages / Log)
README
# @fibjs/logstream
[![NPM version][npm-image]][npm-url]
[![build status][travis-image]][travis-url]
[![appveyor build status][appveyor-image]][appveyor-url]
[![Test coverage][codecov-image]][codecov-url]
[![David deps][david-image]][david-url]
[![Known Vulnerabilities][snyk-image]][snyk-url]
[![npm download][download-image]][download-url][npm-image]: https://img.shields.io/npm/v/@fibjs/logstream.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@fibjs/logstream
[travis-image]: https://img.shields.io/travis/fibjs-modules/logstream.svg?style=flat-square
[travis-url]: https://travis-ci.org/fibjs-modules/logstream
[appveyor-image]: https://ci.appveyor.com/api/projects/status/dcv9kcjdwbqjs35x/branch/master?svg=true
[appveyor-url]: https://ci.appveyor.com/project/ngot/logstream
[codecov-image]: https://img.shields.io/codecov/c/github/fibjs-modules/logstream.svg?style=flat-square
[codecov-url]: https://codecov.io/github/fibjs-modules/logstream?branch=master
[david-image]: https://img.shields.io/david/fibjs-modules/logstream.svg?style=flat-square
[david-url]: https://david-dm.org/fibjs-modules/logstream
[snyk-image]: https://snyk.io/test/npm/@fibjs/logstream/badge.svg?style=flat-square
[snyk-url]: https://snyk.io/test/npm/@fibjs/logstream
[download-image]: https://img.shields.io/npm/dm/@fibjs/logstream.svg?style=flat-square
[download-url]: https://npmjs.org/package/@fibjs/logstreamwrap a file stream as a extremely high performance log stream.
## Install
```bash
$ npm i @fibjs/logstream --save
```## Usage
```js
const fs = require('fs');
const LogStream = require('@fibjs/logstream');const fd = fs.open('path to log file', 'w');
const bf = new LogStream(fd);
bf.writeText('some log');
bf.writeLine('new line log');
bf.end();// close the log stream.
```## Questions & Suggestions
Please open an issue [here](https://github.com/fibjs-modules/logstream/issues).
## License
[MIT](LICENSE)