{"name":"stream-logger","version":"1.0.0","description":"Wrapper on top of buster-evented-logger that does pretty outout to stdout and stderr.","author":{"name":"Christian Johansen"},"contributors":[{"name":"Christian Johansen","email":"christian@cjohansen.no","url":"http://cjohansen.no"},{"name":"August Lilleaas","email":"august@augustl.com","url":"http://augustl.com"},{"name":"Stein Magnus Jodal","email":"stein.magnus@jodal.no","url":"http://jodal.no"}],"main":"./lib/stream-logger","repository":{"type":"git","url":"git://gitorious.org/buster/stream-logger"},"license":{"type":"BSD","url":"http://gitorious.org/buster/stream-logger/blobs/master/LICENSE"},"scripts":{"test":"node test/stream-logger-test"},"dependencies":{"evented-logger":"~1.0"},"devDependencies":{"buster":"0.6.11"},"_id":"stream-logger@1.0.0","dist":{"shasum":"763c70e12c8021bb5b56df3f71404d6cc1bc2b92","tarball":"http://registry-npm.ywwl.com/stream-logger/download/stream-logger-1.0.0.tgz","integrity":"sha512-Ojsd/tWUv/40PPjVW6I6PE3H9P0r7MhGozMTKcaOYjyNEfS4aZhjxhi6t0VNuNfm23nUDZF9DslqsF8ssI5G8w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEALdA1MIREnmsRgCqqN2fqtv0AcK6viAq53G+MrlWrsAiBPSwK+U3PR6EvLf6smcBk2XNZhB1TWucrZU1x9VWrrxA=="}],"size":3938,"noattachment":false,"key":"/stream-logger/-/stream-logger-1.0.0.tgz"},"maintainers":[{"name":"cjohansen","email":"christian@cjohansen.no"},{"name":"augustl","email":"august@augustl.com"}],"directories":{},"deprecated":"No longer maintained","readme":"# stream-logger\n\n[![Build status](https://secure.travis-ci.org/busterjs/stream-logger.png?branch=master)](http://travis-ci.org/busterjs/stream-logger)\n\n> Log messages, events and stdout/stdin (or other) streams\n\n`stream-logger` is a logger that prints certain levels to an out stream and\nothers to an error stream. It's Based on `evented-logger`, and defaults to\nprinting to stdout/stderr.\n\n\n## API\n\n\n### `streamLogger(out, err)`\n\nCreates a new logger. `out` and `err` are two stream objects. `log`,\n`info` and `debug` levels are logged to the `out` stream, while `warn`\nand `error` levels are logged to the `err` stream. If the streams are omitted,\n`process.stdout` and `process.stderr` will be used.\n\n```javascript\nvar streamLogger = require(\"stream-logger\");\n\nvar logger = streamLogger();\nlogger.level = \"debug\";\nlogger.info(\"Hey there\"); // Prints to stdout\nlogger.error(\"Oh noes\");  // Prints to stderr\n\nlogger.level = \"error\";\nlogger.info(\"Hmm\"); // Prints nothing\n```\n\n\n### `log(...)`\n\nAlso: `info`, `debug`, `warning`, `error`.\n\nIf the current log level is `log` or higher, prints a message to the `out`\nstream. See `evented-logger <http://github.com/busterjs/evented-logger/>`_ for\nmore information on the logger API\n\n\n### `streamForLevel(level)`\n\nReturns an object with a `write` method that will indirectly log messages to\n`level`. Note that messages written to this stream will not automatically\nappend line-breaks.\n\n```javascript\nvar streamLogger = require(\"stream-logger\");\n\nvar logger = streamLogger();\nvar stream = logger.streamForLevel(\"warning\");\nstream.write(\"Oh\");\nstream.write(\" noes!\\n\");\n\n// Prints \"Oh noes\\n!\" to stderr\n```\n","publish_time":1379371267813,"_cnpm_publish_time":1379371267813,"dist-tags":{"latest":"1.0.1"}}