Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Izaya

A logging library which writes to a mongoDB instance

Getting Started

Setup

Require the library and initialize it. The most basic setup takes only a MongoDB connection string as described here

var Log = require('izaya');

Log.init({
	url        : 'http://localhost:27017/MyDatabase'
});

This will cause a collection by the default name of logs to be created the first time a write is performed.

Writing logs

There multiple logging functions available right off the bat, and more can be added dynamically. The most basic log content which can be provided is a string. An informative log might take advantage of the standard log level info

Log.info('something normal happened');

while we have the escalated warn and error levels for less acceptable behavior

Log.warn('something concerning happened');
Log.error('something bad happened');

Changelog

0.0.2

  • changed created metadata field to a true date object so it can be queried

This documentation is still in progress...

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages