winston-orientdb

0.0.2 • Public • Published

winston-orientdb

A OrientDB transport for winston.

Index

Install

npm install winston-orientdb --save

Usage

var winston = require('winston');
 
require('winston-orientdb').OrientDB;
 
winston.add(winston.transports.OrientDB, options);

The OrientDB transport takes the following options. 'connection' is required:

  • level: Level of messages that this transport should log, defaults to 'info'.
  • silent: Boolean flag indicating whether to suppress output, defaults to false.
  • connection: Server host name , port , username and password eg. {"host": 'localhost',"port": 2424, "username": "root","password": "root" }
  • db: database name, username and password eg { "name" : "logs", "username": "root", "password": "root", } default {"name" : "logs"}. Database must be exist
  • class: The name of the class you want to store log messages in, defaults to 'logs'. class is be created if it does not exist.
  • storeHost: Boolean indicating if you want to store machine hostname in logs entry, if set to true it populates entry with 'hostname' field, which stores os.hostname() value.
  • label: Label stored with entry object if defined.
  • name: Transport instance identifier. Useful if you need to create multiple OrientDB transports.

Metadata: Logged as a native JSON object in 'meta' property.

Logging unhandled exceptions: For logging unhandled exceptions specify winston-orientdb as handleExceptions logger according to winston documentation.

Tests

npm test

License

MIT

Package Sidebar

Install

npm i winston-orientdb

Weekly Downloads

1

Version

0.0.2

License

MIT

Last publish

Collaborators

  • maheshkumar-kakade