Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

loggin-js/loggin-js-mongodb

Repository files navigation

Loggin'JS MongoDB Plugin

NPM version Downloads Dependencies Known Vulnerabilities
NPM quality

A little MongoDB plugin for loggin-js, save your logs centralized in a database. And later retrieval


Table Of Content

Features

Installing

With npm

npm install loggin-js-mongodb

With yarn

yarn install loggin-js-mongodb

Importing

Importing in node:

const logginMongo = require('loggin-js-mongodb');

Importing using ES6 import:

import logginMongo from 'loggin-js-mongodb';

Usage

const logginMongo = require('loggin-js-mongodb');
loggin.use(logginMongo);
let mongodb = loggin
 .notifier('mongodb', { dbUrl: 'mongodb://0.0.0.0:27017/logs' })
 .color(true)
 .level('debug')
 .formatter('detailed')
 .init();
let logger = loggin.logger();
logger.setNotifiers([csol, mongodb]);
...
let logs = mongodb.fetch({ 'level.name': 'ERROR' });

Collaborating

Pull requests are welcome, as well as any other type of contribution.

Setting up

# clone the repo
$ git clone git@github.com:nombrekeff/loggin-js-mongodb.git
# enter the project
$ cd loggin-js-mongodb
# install dependencies
$ npm install
# run tests
$ npm test

About

A little MongoDB plugin for loggin-js, save and load your logs centralized in a database.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

AltStyle によって変換されたページ (->オリジナル) /