1.1.0 • Published 6 years ago

bunyan-arangodb v1.1.0

Weekly downloads
3
License
Apache 2.0
Repository
github
Last release
6 years ago

ArangoDB stream for Bunyan

Known Vulnerabilities

A simple and configurable ArangoDB for Bunyan. The module itself is relatively simple, so it should work with most versions of ArangoDB and the module dependencies.

Please note: This module will not create the database and/or collection for you. These must already exist in your ArangoDB instance when your code is run.

Installation

npm install bunyan-arangodb

Basic Usage

var bunyan = require( 'bunyan' );
var bunyanArangoDB = require( 'bunyan-arangodb' );

var _systemLogger = {
    'src': false,
    'name': 'systemLogger',
    'serializers': bunyan.stdSerializers,
    'streams': [ {
        'level': 'info',
        'stream': new bunyanArangoDB( {
            'collection': 'systemLog',
            'agentOptions': {}, // Standard agentOptions that are permitted with http.Agent and https.Agent (Optional)
            'username': 'someGuy',
            'password': 'myPassword',
            'server': 'http://127.0.0.1:8529'  // default
            'db': '_system'  // default
        } )
    } ]
}

var logger = bunyan.createLogger( _systemLogger );

logger.info( {
    'type' : 'notice',
    'user': 'kurt'
}, 'Kurt just added an entry in the systemLog collection.' );

API

Usage is straight forward and relatively simple. Starting with v1.0.0, you can pass agentOptions, which will allow for things such as trusting certificates issued from internal CAs.

1.1.0

6 years ago

0.3.3

7 years ago

0.3.1

7 years ago