0.1.1 • Published 10 years ago

azul-logger v0.1.1

Weekly downloads
3
License
MIT
Repository
github
Last release
10 years ago

Azul.js Logger

NPM version Build status Code Climate Coverage Status Dependencies devDependencies

A logging utility for Azul.js.

require('azul-logger')(db.query);

API

azulLogger(query, options)

query

Type: Query

An Azul.js query object that should be watched for logging. The query and all queries that are derived from it will have information about them logged. Usually you'll want this to be your main query instance, db.query.

options.slow

Type: Number
Default: 500

Number of milliseconds that should be considered a slow query.

options.log

Type: Function
Default: console.log

The function that will be called with logging output. This should function the same way that console.log does.

License

This project is distributed under the MIT license.