Skip to content

sdumetz/winston-nedb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

winston-nedb

A nedb transport for winston

###Usage

####Available Options

  • filename (Optionnal) - string : if none given, db will not be persistent
  • index (Optionnal) - bool : index db based on timestamp. speed up search on this field
  • compact (Optionnal) - bool : Enable compaction on log rotation. Not really usefull except if you do not plan to delete logs

####Usage

var Nedb = require('../winston-nedb').Nedb;
var winston = require('winston');

var options = {
    filename:'/tmp/log_db',
    index:true,
    autocompact:false
}
var logger = new (winston.Logger)({
    transports: [
        new Nedb(options)
    ]
});

###Currently supported

basic querying

###Untested but should work

###TODO

  • Allow indexing based on any field (and multiple fields?)
  • Check if autocompact is integer (or it works with float?) AND set a minimum
  • Implement capped size
  • Set multiple timestamp choices (epoch OR date OR ??)

About

A nedb transport for winston

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors