add bunyan-logentries definitions

This commit is contained in:
Aymeric Beaumet 2014-10-21 18:32:27 +02:00
parent bd9a1922e4
commit 4846f970d2
3 changed files with 32 additions and 0 deletions

View File

@ -49,6 +49,7 @@ All definitions files include a header with the author and editors, so at some p
* [Browser Harness](https://github.com/scriby/browser-harness) (by [Chris Scribner](https://github.com/scriby))
* [bucks](https://github.com/CyberAgent/bucks.js) (by [Shunsuke Ohtani](https://github.com/zaneli))
* [bunyan](https://github.com/trentm/node-bunyan) (by [Alex Mikhalev](https://github.com/amikhalev))
* [bunyan-logentries](https://github.com/nemtsov/node-bunyan-logentries) (by [Aymeric Beaumet](http://aymericbeaumet.me))
* [CasperJS](http://casperjs.org) (by [Jed Mao](https://github.com/jedmao))
* [CanvasJS](http://canvasjs.com) (by [Mark Overholt](https://github.com/mover5))
* [Cheerio](https://github.com/MatthewMueller/cheerio) (by [Bret Little](https://github.com/blittle))

View File

@ -0,0 +1,14 @@
/// <reference path="./bunyan-logentries.d.ts" />
/// <reference path="../bunyan/bunyan.d.ts" />
import bunyan = require("bunyan");
import bunyanLogentries = require("bunyan-logentries");
var logger: bunyan.Logger = bunyan.createLogger({
name: "foobar",
streams: [{
level: "info",
stream: bunyanLogentries.createStream({token: "foobar"}),
type: "raw"
}]
});

View File

@ -0,0 +1,17 @@
// Type definitions for node-bunyan-logentries v0.1.0
// Project: https://github.com/nemtsov/node-bunyan-logentries
// Definitions by: Aymeric Beaumet <http://aymericbeaumet.me>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../node/node.d.ts" />
/// <reference path="../bunyan/bunyan.d.ts" />
declare module "bunyan-logentries" {
import bunyan = require("bunyan");
interface StreamOptions {
token: string;
}
export function createStream(options: StreamOptions): NodeJS.WritableStream;
}