diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 84f0c9190f..a4fce2940b 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -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)) diff --git a/bunyan-logentries/bunyan-logentries-test.ts b/bunyan-logentries/bunyan-logentries-test.ts new file mode 100644 index 0000000000..d0e4874898 --- /dev/null +++ b/bunyan-logentries/bunyan-logentries-test.ts @@ -0,0 +1,14 @@ +/// +/// + +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" + }] +}); diff --git a/bunyan-logentries/bunyan-logentries.d.ts b/bunyan-logentries/bunyan-logentries.d.ts new file mode 100644 index 0000000000..de012b68a0 --- /dev/null +++ b/bunyan-logentries/bunyan-logentries.d.ts @@ -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 +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// +/// + +declare module "bunyan-logentries" { + import bunyan = require("bunyan"); + + interface StreamOptions { + token: string; + } + + export function createStream(options: StreamOptions): NodeJS.WritableStream; +}