Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/abumq/residue-winston
Official winston transport for Residue logging server
https://github.com/abumq/residue-winston
javascript-library javascript-remote-logging logging-library remote-logging residue-client residue-tools winston-transport
Last synced: about 1 month ago
JSON representation
Official winston transport for Residue logging server
- Host: GitHub
- URL: https://github.com/abumq/residue-winston
- Owner: abumq
- License: other
- Created: 2018-02-19T04:59:14.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-10-25T08:45:07.000Z (about 5 years ago)
- Last Synced: 2024-11-21T21:51:37.137Z (about 1 month ago)
- Topics: javascript-library, javascript-remote-logging, logging-library, remote-logging, residue-client, residue-tools, winston-transport
- Language: JavaScript
- Homepage:
- Size: 27.3 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
﷽
# Winston Transport for Residue
[![Version](https://img.shields.io/npm/v/residue-winston.svg)](https://www.npmjs.com/package/residue-winston)
[![GitHub license](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/amrayn/residue-winston/blob/master/LICENSE)[![Donate](https://amrayn.github.io/donate.png?v2)](https://amrayn.com/donate)
For options, please refer to [Residue for Node.js](https://github.com/amrayn/residue-node#connectoptions)
Simply enable the transport on winston
```javascript
const Residue = require('residue-winston');
const residue_internal = Residue.residue_internal;// or import Residue, { residue_internal } from 'residue-winston';
const logger = winston.createLogger({
level: 'silly',
transports: [
new Residue({
logger_id: 'sample-app',
// following is optional, if config_file not provided
// all these options are used as config
config_file: 'path to config file'
})
]
});console.log(`Residue library version ${residue_internal.version()}-${residue_internal.type()}`);
```## Use Residue Logger
You can also use mix of winston logger and residue logger when using `residue-winston` module.```
const rlogger = residue_internal.getLogger('mylogger');
rlogger.info('this is object value: %s', {name: 'Adam', age: 960});
```Learn more [here](https://github.com/amrayn/residue-node#usage)
## License
```
Copyright 2017-present Amrayn Web Services
Copyright 2017-present @abumusamqhttps://github.com/amrayn/
https://amrayn.com
https://muflihun.com/Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```