// The MIT License (MIT)
// Copyright (c) 2014 Stefan Negrea
//
// Use of this source code is governed by a MIT license that can be 
// found in the LICENSE file.

var logger = require('../lib/logger');


var logConfiguration = {
  'level': 'INFO',
  'loggers': {
    'mongodb': true,
    //added here for visual feedback
    'console': true
  }
};

var log = new logger(logConfiguration);

setInterval(function() {
  log.info('Test info log');
}, 10);

setInterval(function() {
  log.error('Test error log with stack trace');
}, 1000);

@@ -197,17 +197,16 @@
 ger');%0A%0A
-%0A
 var logC
@@ -379,24 +379,38 @@
 guration);%0A%0A
+//create logs%0A
 setInterval(
@@ -456,16 +456,18 @@
 );%0A%7D, 10
+00
 );%0A%0AsetI
@@ -531,22 +531,22 @@
 ck trace');%0A
-
 %7D, 1000);%0A
@@ -533,20 +533,303 @@
  trace');%0A%7D, 1000);%0A
+%0A//sample query from database%0A//this will use the mongodb connection already established by the logger%0AsetInterval(function() %7B%0A  var mongodbLogger = log.getLoggers().mongodb;%0A  mongodbLogger.model().find().exec()%0A  .then(function(results)%7B%0A    console.log(results);%0A  %7D);%0A%7D, 2000);%0A

Update sample code for the logger to show how to query the logs.