Coder Social home page Coder Social logo

node-bunyan's Introduction

npm version Build Status

Bunyan is a simple and fast JSON logging library for node.js services:

var bunyan = require('bunyan');
var log = bunyan.createLogger({name: "myapp"});
log.info("hi");

and a bunyan CLI tool for nicely viewing those logs:

bunyan CLI screenshot

Manifesto: Server logs should be structured. JSON's a good format. Let's do that. A log record is one line of JSON.stringify'd output. Let's also specify some common names for the requisite and common fields for a log record (see below).

Table of Contents

Current Status

Stable. I do my best to follow semver: i.e. you should only need to worry about code breaking for a major version bump. Bunyan currently supports node 0.10 and greater. Follow @trentmick for updates to Bunyan.

There is an email discussion list [email protected], also as a forum in the browser.

Active branches:

  • "1.x" is for 1.x maintenance work, if any. 1.x releases are still "latest" in npm.
  • "master" is currently for coming Bunyan 2.x work. For now, 2.x releases are published to npm with the "beta" tag, meaning that npm install bunyan is still 1.x for now. To install 2.x use npm install bunyan@2 or npm install bunyan@beta.

Installation

npm install bunyan

Tip: The bunyan CLI tool is written to be compatible (within reason) with all versions of Bunyan logs. Therefore you might want to npm install -g bunyan to get the bunyan CLI on your PATH, then use local bunyan installs for node.js library usage of bunyan in your apps.

Tip: Installing without optional dependencies can dramatically reduce bunyan's install size. dtrace-provider is used for dtrace features, mv is used for RotatingFileStream, and moment is used for local time. If you don't need these features, consider installing with the --no-optional flag.

Features

Introduction

Like most logging libraries you create a Logger instance and call methods named after the logging levels:

// hi.js
var bunyan = require('bunyan');
var log = bunyan.createLogger({name: 'myapp'});
log.info('hi');
log.warn({lang: 'fr'}, 'au revoir');

All loggers must provide a "name". This is somewhat akin to the log4j logger "name", but Bunyan doesn't do hierarchical logger names.

Bunyan log records are JSON. A few fields are added automatically: "pid", "hostname", "time" and "v".

$ node hi.js
{"name":"myapp","hostname":"banana.local","pid":40161,"level":30,"msg":"hi","time":"2013-01-04T18:46:23.851Z","v":0}
{"name":"myapp","hostname":"banana.local","pid":40161,"level":40,"lang":"fr","msg":"au revoir","time":"2013-01-04T18:46:23.853Z","v":0}

Constructor API

var bunyan = require('bunyan');
var log = bunyan.createLogger({
    name: <string>,                     // Required
    level: <level name or number>,      // Optional, see "Levels" section
    stream: <node.js stream>,           // Optional, see "Streams" section
    streams: [<bunyan streams>, ...],   // Optional, see "Streams" section
    serializers: <serializers mapping>, // Optional, see "Serializers" section
    src: <boolean>,                     // Optional, see "src" section

    // Any other fields are added to all log records as is.
    foo: 'bar',
    ...
});

Log Method API

The example above shows two different ways to call log.info(...). The full API is:

log.info();     // Returns a boolean: is the "info" level enabled?
                // This is equivalent to `log.isInfoEnabled()` or
                // `log.isEnabledFor(INFO)` in log4j.

log.info('hi');                     // Log a simple string message (or number).
log.info('hi %s', bob, anotherVar); // Uses `util.format` for msg formatting.

log.info({foo: 'bar'}, 'hi');
                // The first field can optionally be a "fields" object, which
                // is merged into the log record.

log.info(err);  // Special case to log an `Error` instance to the record.
                // This adds an "err" field with exception details
                // (including the stack) and sets "msg" to the exception
                // message.
log.info(err, 'more on this: %s', more);
                // ... or you can specify the "msg".

log.info({foo: 'bar', err: err}, 'some msg about this error');
                // To pass in an Error *and* other fields, use the `err`
                // field name for the Error instance **and ensure your logger
                // has a `err` serializer.** One way to ensure the latter is:
                //      var log = bunyan.createLogger({
                //          ...,
                //          serializers: bunyan.stdSerializers
                //      });
                // See the "Serializers" section below for details.

Note that this implies you cannot blindly pass any object as the first argument to log it because that object might include fields that collide with Bunyan's core record fields. In other words, log.info(mywidget) may not yield what you expect. Instead of a string representation of mywidget that other logging libraries may give you, Bunyan will try to JSON-ify your object. It is a Bunyan best practice to always give a field name to included objects, e.g.:

log.info({widget: mywidget}, ...)

This will dove-tail with Bunyan serializer support, discussed later.

The same goes for all of Bunyan's log levels: log.trace, log.debug, log.info, log.warn, log.error, and log.fatal. See the levels section below for details and suggestions.

CLI Usage

Bunyan log output is a stream of JSON objects. This is great for processing, but not for reading directly. A bunyan tool is provided for pretty-printing bunyan logs and for filtering (e.g. | bunyan -c 'this.foo == "bar"'). Using our example above:

$ node hi.js | ./node_modules/.bin/bunyan
[2013-01-04T19:01:18.241Z]  INFO: myapp/40208 on banana.local: hi
[2013-01-04T19:01:18.242Z]  WARN: myapp/40208 on banana.local: au revoir (lang=fr)

See the screenshot above for an example of the default coloring of rendered log output. That example also shows the nice formatting automatically done for some well-known log record fields (e.g. req is formatted like an HTTP request, res like an HTTP response, err like an error stack trace).

One interesting feature is filtering of log content, which can be useful for digging through large log files or for analysis. We can filter only records above a certain level:

$ node hi.js | bunyan -l warn
[2013-01-04T19:08:37.182Z]  WARN: myapp/40353 on banana.local: au revoir (lang=fr)

Or filter on the JSON fields in the records (e.g. only showing the French records in our contrived example):

$ node hi.js | bunyan -c 'this.lang == "fr"'
[2013-01-04T19:08:26.411Z]  WARN: myapp/40342 on banana.local: au revoir (lang=fr)

See bunyan --help for other facilities.

Streams Introduction

By default, log output is to stdout and at the "info" level. Explicitly that looks like:

var log = bunyan.createLogger({
    name: 'myapp',
    stream: process.stdout,
    level: 'info'
});

That is an abbreviated form for a single stream. You can define multiple streams at different levels.

var log = bunyan.createLogger({
  name: 'myapp',
  streams: [
    {
      level: 'info',
      stream: process.stdout            // log INFO and above to stdout
    },
    {
      level: 'error',
      path: '/var/tmp/myapp-error.log'  // log ERROR and above to a file
    }
  ]
});

More on streams in the Streams section below.

log.child

Bunyan has a concept of a child logger to specialize a logger for a sub-component of your application, i.e. to create a new logger with additional bound fields that will be included in its log records. A child logger is created with log.child(...).

In the following example, logging on a "Wuzzle" instance's this.log will be exactly as on the parent logger with the addition of the widget_type field:

var bunyan = require('bunyan');
var log = bunyan.createLogger({name: 'myapp'});

function Wuzzle(options) {
    this.log = options.log.child({widget_type: 'wuzzle'});
    this.log.info('creating a wuzzle')
}
Wuzzle.prototype.woos = function () {
    this.log.warn('This wuzzle is woosey.')
}

log.info('start');
var wuzzle = new Wuzzle({log: log});
wuzzle.woos();
log.info('done');

Running that looks like (raw):

$ node myapp.js
{"name":"myapp","hostname":"myhost","pid":34572,"level":30,"msg":"start","time":"2013-01-04T07:47:25.814Z","v":0}
{"name":"myapp","hostname":"myhost","pid":34572,"widget_type":"wuzzle","level":30,"msg":"creating a wuzzle","time":"2013-01-04T07:47:25.815Z","v":0}
{"name":"myapp","hostname":"myhost","pid":34572,"widget_type":"wuzzle","level":40,"msg":"This wuzzle is woosey.","time":"2013-01-04T07:47:25.815Z","v":0}
{"name":"myapp","hostname":"myhost","pid":34572,"level":30,"msg":"done","time":"2013-01-04T07:47:25.816Z","v":0}

And with the bunyan CLI (using the "short" output mode):

$ node myapp.js  | bunyan -o short
07:46:42.707Z  INFO myapp: start
07:46:42.709Z  INFO myapp: creating a wuzzle (widget_type=wuzzle)
07:46:42.709Z  WARN myapp: This wuzzle is woosey. (widget_type=wuzzle)
07:46:42.709Z  INFO myapp: done

A more practical example is in the node-restify web framework. Restify uses Bunyan for its logging. One feature of its integration, is that if server.use(restify.requestLogger()) is used, each restify request handler includes a req.log logger that is:

log.child({req_id: <unique request id>}, true)

Apps using restify can then use req.log and have all such log records include the unique request id (as "req_id"). Handy.

Serializers

Bunyan has a concept of "serializer" functions to produce a JSON-able object from a JavaScript object, so you can easily do the following:

log.info({req: <request object>}, 'something about handling this request');

and have the req entry in the log record be just a reasonable subset of <request object> fields (or computed data about those fields).

A logger instance can have a serializers mapping of log record field name ("req" in this example) to a serializer function. When creating the log record, Bunyan will call the serializer function for top-level fields of that name. An example:

function reqSerializer(req) {
    return {
        method: req.method,
        url: req.url,
        headers: req.headers
    };
}
var log = bunyan.createLogger({
    name: 'myapp',
    serializers: {
        req: reqSerializer
    }
});

Typically serializers are added to a logger at creation time via:

var log = bunyan.createLogger({
    name: 'myapp',
    serializers: {
        foo: function fooSerializer(foo) { ... },
        ...
    }
});

// or
var log = bunyan.createLogger({
    name: 'myapp',
    serializers: bunyan.stdSerializers
});

Serializers can also be added after creation via <logger>.addSerializers(...), e.g.:

var log = bunyan.createLogger({name: 'myapp'});
log.addSerializers({req: reqSerializer});

Requirements for serializers functions

A serializer function is passed unprotected objects that are passed to the log.info, log.debug, etc. call. This means a poorly written serializer function can cause side-effects. Logging shouldn't do that. Here are a few rules and best practices for serializer functions:

  • A serializer function should never throw. The bunyan library does protect somewhat from this: if the serializer throws an error, then bunyan will (a) write an ugly message on stderr (along with the traceback), and (b) the field in the log record will be replaced with a short error message. For example:

    bunyan: ERROR: Exception thrown from the "foo" Bunyan serializer. This should never happen. This is a bug in that serializer function.
    TypeError: Cannot read property 'not' of undefined
        at Object.fooSerializer [as foo] (/Users/trentm/tm/node-bunyan/bar.js:8:26)
        at /Users/trentm/tm/node-bunyan/lib/bunyan.js:873:50
        at Array.forEach (native)
        at Logger._applySerializers (/Users/trentm/tm/node-bunyan/lib/bunyan.js:865:35)
        at mkRecord (/Users/trentm/tm/node-bunyan/lib/bunyan.js:978:17)
        at Logger.info (/Users/trentm/tm/node-bunyan/lib/bunyan.js:1044:19)
        at Object.<anonymous> (/Users/trentm/tm/node-bunyan/bar.js:13:5)
        at Module._compile (module.js:409:26)
        at Object.Module._extensions..js (module.js:416:10)
        at Module.load (module.js:343:32)
    {"name":"bar","hostname":"danger0.local","pid":47411,"level":30,"foo":"(Error in Bunyan log \"foo\" serializer broke field. See stderr for details.)","msg":"one","time":"2017-03-08T02:53:51.173Z","v":0}
    
  • A serializer function should never mutate the given object. Doing so will change the object in your application.

  • A serializer function should be defensive. In my experience, it is common to set a serializer in an app, say for field name "foo", and then accidentally have a log line that passes a "foo" that is undefined, or null, or of some unexpected type. A good start at defensiveness is to start with this:

    function fooSerializer(foo) {
        // Guard against foo be null/undefined. Check that expected fields
        // are defined.
        if (!foo || !foo.bar)
            return foo;
        var obj = {
            // Create the object to be logged.
            bar: foo.bar
        }
        return obj;
    };

Standard Serializers

Bunyan includes a small set of "standard serializers", exported as bunyan.stdSerializers. Their use is completely optional. An example using all of them:

var log = bunyan.createLogger({
    name: 'myapp',
    serializers: bunyan.stdSerializers
});

or particular ones:

var log = bunyan.createLogger({
    name: 'myapp',
    serializers: {err: bunyan.stdSerializers.err}
});

Standard serializers are:

Field Description
err Used for serializing JavaScript error objects, including traversing an error's cause chain for error objects with a .cause() -- e.g. as from verror.
req Common fields from a node.js HTTP request object.
res Common fields from a node.js HTTP response object.

Note that the req and res serializers intentionally do not include the request/response body, as that can be prohibitively large. If helpful, the restify framework's audit logger plugin has its own req/res serializers that include more information (optionally including the body).

src

The source file, line and function of the log call site can be added to log records by using the src: true config option:

var log = bunyan.createLogger({src: true, ...});

This adds the call source info with the 'src' field, like this:

{
  "name": "src-example",
  "hostname": "banana.local",
  "pid": 123,
  "component": "wuzzle",
  "level": 4,
  "msg": "This wuzzle is woosey.",
  "time": "2012-02-06T04:19:35.605Z",
  "src": {
    "file": "/Users/trentm/tm/node-bunyan/examples/src.js",
    "line": 20,
    "func": "Wuzzle.woos"
  },
  "v": 0
}

WARNING: Determining the call source info is slow. Never use this option in production.

Levels

The log levels in bunyan are as follows. The level descriptions are best practice opinions of the author.

  • "fatal" (60): The service/app is going to stop or become unusable now. An operator should definitely look into this soon.
  • "error" (50): Fatal for a particular request, but the service/app continues servicing other requests. An operator should look at this soon(ish).
  • "warn" (40): A note on something that should probably be looked at by an operator eventually.
  • "info" (30): Detail on regular operation.
  • "debug" (20): Anything else, i.e. too verbose to be included in "info" level.
  • "trace" (10): Logging from external libraries used by your app or very detailed application logging.

Setting a logger instance (or one of its streams) to a particular level implies that all log records at that level and above are logged. E.g. a logger set to level "info" will log records at level info and above (warn, error, fatal).

While using log level names is preferred, the actual level values are integers internally (10 for "trace", ..., 60 for "fatal"). Constants are defined for the levels: bunyan.TRACE ... bunyan.FATAL. The lowercase level names are aliases supported in the API, e.g. log.level("info"). There is one exception: DTrace integration uses the level names. The fired DTrace probes are named 'bunyan-$levelName'.

Here is the API for querying and changing levels on an existing logger. Recall that a logger instance has an array of output "streams":

log.level() -> INFO   // gets current level (lowest level of all streams)

log.level(INFO)       // set all streams to level INFO
log.level("info")     // set all streams to level INFO

log.levels() -> [DEBUG, INFO]   // get array of levels of all streams
log.levels(0) -> DEBUG          // get level of stream at index 0
log.levels("foo")               // get level of stream with name "foo"

log.levels(0, INFO)             // set level of stream 0 to INFO
log.levels(0, "info")           // can use "info" et al aliases
log.levels("foo", WARN)         // set stream named "foo" to WARN

Level suggestions

Trent's biased suggestions for server apps: Use "debug" sparingly. Information that will be useful to debug errors post mortem should usually be included in "info" messages if it's generally relevant or else with the corresponding "error" event. Don't rely on spewing mostly irrelevant debug messages all the time and sifting through them when an error occurs.

Trent's biased suggestions for node.js libraries: IMHO, libraries should only ever log at trace-level. Fine control over log output should be up to the app using a library. Having a library that spews log output at higher levels gets in the way of a clear story in the app logs.

Log Record Fields

This section will describe rules for the Bunyan log format: field names, field meanings, required fields, etc. However, a Bunyan library doesn't strictly enforce all these rules while records are being emitted. For example, Bunyan will add a time field with the correct format to your log records, but you can specify your own. It is the caller's responsibility to specify the appropriate format.

The reason for the above leniency is because IMO logging a message should never break your app. This leads to this rule of logging: a thrown exception from log.info(...) or equivalent (other than for calling with the incorrect signature) is always a bug in Bunyan.

A typical Bunyan log record looks like this:

{"name":"myserver","hostname":"banana.local","pid":123,"req":{"method":"GET","url":"/path?q=1#anchor","headers":{"x-hi":"Mom","connection":"close"}},"level":3,"msg":"start request","time":"2012-02-03T19:02:46.178Z","v":0}

Pretty-printed:

{
  "name": "myserver",
  "hostname": "banana.local",
  "pid": 123,
  "req": {
    "method": "GET",
    "url": "/path?q=1#anchor",
    "headers": {
      "x-hi": "Mom",
      "connection": "close"
    },
    "remoteAddress": "120.0.0.1",
    "remotePort": 51244
  },
  "level": 3,
  "msg": "start request",
  "time": "2012-02-03T19:02:57.534Z",
  "v": 0
}

Core fields

  • v: Required. Integer. Added by Bunyan. Cannot be overridden. This is the Bunyan log format version (require('bunyan').LOG_VERSION). The log version is a single integer. 0 is until I release a version "1.0.0" of node-bunyan. Thereafter, starting with 1, this will be incremented if there is any backward incompatible change to the log record format. Details will be in "CHANGES.md" (the change log).
  • level: Required. Integer. Added by Bunyan. Cannot be overridden. See the "Levels" section.
  • name: Required. String. Provided at Logger creation. You must specify a name for your logger when creating it. Typically this is the name of the service/app using Bunyan for logging.
  • hostname: Required. String. Provided or determined at Logger creation. You can specify your hostname at Logger creation or it will be retrieved via os.hostname().
  • pid: Required. Integer. Filled in automatically at Logger creation.
  • time: Required. String. Added by Bunyan. Can be overridden. The date and time of the event in ISO 8601 Extended Format format and in UTC, as from Date.toISOString().
  • msg: Required. String. Every log.debug(...) et al call must provide a log message.
  • src: Optional. Object giving log call source info. This is added automatically by Bunyan if the "src: true" config option is given to the Logger. Never use in production as this is really slow.

Go ahead and add more fields, and nested ones are fine (and recommended) as well. This is why we're using JSON. Some suggestions and best practices follow (feedback from actual users welcome).

Recommended/Best Practice Fields

  • err: Object. A caught JS exception. Log that thing with log.info(err) to get:

    ...
    "err": {
      "message": "boom",
      "name": "TypeError",
      "stack": "TypeError: boom\n    at Object.<anonymous> ..."
    },
    "msg": "boom",
    ...

    Or use the bunyan.stdSerializers.err serializer in your Logger and do this log.error({err: err}, "oops"). See "examples/err.js".

  • req_id: String. A request identifier. Including this field in all logging tied to handling a particular request to your server is strongly suggested. This allows post analysis of logs to easily collate all related logging for a request. This really shines when you have a SOA with multiple services and you carry a single request ID from the top API down through all APIs (as node-restify facilitates with its 'Request-Id' header).

  • req: An HTTP server request. Bunyan provides bunyan.stdSerializers.req to serialize a request with a suggested set of keys. Example:

    {
      "method": "GET",
      "url": "/path?q=1#anchor",
      "headers": {
        "x-hi": "Mom",
        "connection": "close"
      },
      "remoteAddress": "120.0.0.1",
      "remotePort": 51244
    }
  • res: An HTTP server response. Bunyan provides bunyan.stdSerializers.res to serialize a response with a suggested set of keys. Example:

    {
      "statusCode": 200,
      "header": "HTTP/1.1 200 OK\r\nContent-Type: text/plain\r\nConnection: keep-alive\r\nTransfer-Encoding: chunked\r\n\r\n"
    }

Other fields to consider

  • req.username: Authenticated user (or for a 401, the user attempting to auth).
  • Some mechanism to calculate response latency. "restify" users will have an "X-Response-Time" header. A latency custom field would be fine.
  • req.body: If you know that request bodies are small (common in APIs, for example), then logging the request body is good.

Streams

A "stream" is Bunyan's name for where it outputs log messages (the equivalent to a log4j Appender). Ultimately Bunyan uses a Writable Stream interface, but there are some additional attributes used to create and manage the stream. A Bunyan Logger instance has one or more streams. In general streams are specified with the "streams" option:

var bunyan = require('bunyan');
var log = bunyan.createLogger({
    name: "foo",
    streams: [
        {
            stream: process.stderr,
            level: "debug"
        },
        ...
    ]
});

For convenience, if there is only one stream, it can be specified with the "stream" and "level" options (internally converted to a Logger.streams).

var log = bunyan.createLogger({
    name: "foo",
    stream: process.stderr,
    level: "debug"
});

Note that "file" streams do not support this shortcut (partly for historical reasons and partly to not make it difficult to add a literal "path" field on log records).

If neither "streams" nor "stream" are specified, the default is a stream of type "stream" emitting to process.stdout at the "info" level.

Adding a Stream

After a bunyan instance has been initialized, you may add additional streams by calling the addStream function.

var bunyan = require('bunyan');
var log = bunyan.createLogger('myLogger');
log.addStream({
  name: "myNewStream",
  stream: process.stderr,
  level: "debug"
});

stream errors

A Bunyan logger instance can be made to re-emit "error" events from its streams. Bunyan does so by default for type === "file" streams, so you can do this:

var log = bunyan.createLogger({name: 'mylog', streams: [{path: LOG_PATH}]});
log.on('error', function (err, stream) {
    // Handle stream write or create error here.
});

As of [email protected], the reemitErrorEvents field can be used when adding a stream to control whether "error" events are re-emitted on the Logger. For example:

var EventEmitter = require('events').EventEmitter;
var util = require('util');

function MyFlakyStream() {}
util.inherits(MyFlakyStream, EventEmitter);

MyFlakyStream.prototype.write = function (rec) {
    this.emit('error', new Error('boom'));
}

var log = bunyan.createLogger({
    name: 'this-is-flaky',
    streams: [
        {
            type: 'raw',
            stream: new MyFlakyStream(),
            reemitErrorEvents: true
        }
    ]
});
log.info('hi there');

The behaviour is as follows:

  • reemitErrorEvents not specified: file streams will re-emit error events on the Logger instance.
  • reemitErrorEvents: true: error events will be re-emitted on the Logger for any stream with a .on() function -- which includes file streams, process.stdout/stderr, and any object that inherits from EventEmitter.
  • reemitErrorEvents: false: error events will not be re-emitted for any streams.

Note: "error" events are not related to log records at the "error" level as produced by log.error(...). See the node.js docs on error events for details.

stream type: stream

A type === 'stream' is a plain ol' node.js Writable Stream. A "stream" (the writable stream) field is required. E.g.: process.stdout, process.stderr.

var log = bunyan.createLogger({
    name: 'foo',
    streams: [{
        stream: process.stderr
        // `type: 'stream'` is implied
    }]
});
Field Required? Default Description
stream Yes - A "Writable Stream", e.g. a std handle or an open file write stream.
type No n/a `type == 'stream'` is implied if the `stream` field is given.
level No info The level to which logging to this stream is enabled. If not specified it defaults to "info". If specified this can be one of the level strings ("trace", "debug", ...) or constants (`bunyan.TRACE`, `bunyan.DEBUG`, ...). This serves as a severity threshold for that stream so logs of greater severity will also pass through (i.e. If level="warn", error and fatal will also pass through this stream).
name No - A name for this stream. This may be useful for usage of `log.level(NAME, LEVEL)`. See the [Levels section](#levels) for details. A stream "name" isn't used for anything else.

stream type: file

A type === 'file' stream requires a "path" field. Bunyan will open this file for appending. E.g.:

var log = bunyan.createLogger({
    name: 'foo',
    streams: [{
        path: '/var/log/foo.log',
        // `type: 'file'` is implied
    }]
});
Field Required? Default Description
path Yes - A file path to which to log.
type No n/a `type == 'file'` is implied if the `path` field is given.
level No info The level to which logging to this stream is enabled. If not specified it defaults to "info". If specified this can be one of the level strings ("trace", "debug", ...) or constants (`bunyan.TRACE`, `bunyan.DEBUG`, ...). This serves as a severity threshold for that stream so logs of greater severity will also pass through (i.e. If level="warn", error and fatal will also pass through this stream).
name No - A name for this stream. This may be useful for usage of `log.level(NAME, LEVEL)`. See the [Levels section](#levels) for details. A stream "name" isn't used for anything else.

stream type: rotating-file

WARNING on node 0.8 usage: Users of Bunyan's rotating-file should (a) be using at least bunyan 0.23.1 (with the fix for this issue), and (b) should use at least node 0.10 (node 0.8 does not support the unref() method on setTimeout(...) needed for the mentioned fix). The symptom is that process termination will hang for up to a full rotation period.

WARNING on cluster usage: Using Bunyan's rotating-file stream with node.js's "cluster" module can result in unexpected file rotation. You must not have multiple processes in the cluster logging to the same file path. In other words, you must have a separate log file path for the master and each worker in the cluster. Alternatively, consider using a system file rotation facility such as logrotate on Linux or logadm on SmartOS/Illumos. See this comment on issue #117 for details.

A type === 'rotating-file' is a file stream that handles file automatic rotation.

var log = bunyan.createLogger({
    name: 'foo',
    streams: [{
        type: 'rotating-file',
        path: '/var/log/foo.log',
        period: '1d',   // daily rotation
        count: 3        // keep 3 back copies
    }]
});

This will rotate '/var/log/foo.log' every day (at midnight) to:

/var/log/foo.log.0     # yesterday
/var/log/foo.log.1     # 1 day ago
/var/log/foo.log.2     # 2 days ago

Currently, there is no support for providing a template for the rotated files, or for rotating when the log reaches a threshold size.

Field Required? Default Description
type Yes - "rotating-file"
path Yes - A file path to which to log. Rotated files will be "$path.0", "$path.1", ...
period No 1d The period at which to rotate. This is a string of the format "$number$scope" where "$scope" is one of "ms" (milliseconds -- only useful for testing), "h" (hours), "d" (days), "w" (weeks), "m" (months), "y" (years). Or one of the following names can be used "hourly" (means 1h), "daily" (1d), "weekly" (1w), "monthly" (1m), "yearly" (1y). Rotation is done at the start of the scope: top of the hour (h), midnight (d), start of Sunday (w), start of the 1st of the month (m), start of Jan 1st (y).
count No 10 The number of rotated files to keep.
level No info The level at which logging to this stream is enabled. If not specified it defaults to "info". If specified this can be one of the level strings ("trace", "debug", ...) or constants (`bunyan.TRACE`, `bunyan.DEBUG`, ...).
name No - A name for this stream. This may be useful for usage of `log.level(NAME, LEVEL)`. See the [Levels section](#levels) for details. A stream "name" isn't used for anything else.

Note on log rotation: Often you may be using external log rotation utilities like logrotate on Linux or logadm on SmartOS/Illumos. In those cases, unless you are ensuring "copy and truncate" semantics (via copytruncate with logrotate or -c with logadm) then the fd for your 'file' stream will change. You can tell bunyan to reopen the file stream with code like this in your app:

var log = bunyan.createLogger(...);
...
process.on('SIGUSR2', function () {
    log.reopenFileStreams();
});

where you'd configure your log rotation to send SIGUSR2 (or some other signal) to your process. Any other mechanism to signal your app to run log.reopenFileStreams() would work as well.

stream type: raw

  • raw: Similar to a "stream" writable stream, except that the write method is given raw log record Objects instead of a JSON-stringified string. This can be useful for hooking on further processing to all Bunyan logging: pushing to an external service, a RingBuffer (see below), etc.

raw + RingBuffer Stream

Bunyan comes with a special stream called a RingBuffer which keeps the last N records in memory and does not write the data anywhere else. One common strategy is to log 'info' and higher to a normal log file but log all records (including 'trace') to a ringbuffer that you can access via a debugger, or your own HTTP interface, or a post-mortem facility like MDB or node-panic.

To use a RingBuffer:

/* Create a ring buffer that stores the last 100 records. */
var bunyan = require('bunyan');
var ringbuffer = new bunyan.RingBuffer({ limit: 100 });
var log = bunyan.createLogger({
    name: 'foo',
    streams: [
        {
            level: 'info',
            stream: process.stdout
        },
        {
            level: 'trace',
            type: 'raw',    // use 'raw' to get raw log record objects
            stream: ringbuffer
        }
    ]
});

log.info('hello world');
console.log(ringbuffer.records);

This example emits:

[ { name: 'foo',
    hostname: '912d2b29',
    pid: 50346,
    level: 30,
    msg: 'hello world',
    time: '2012-06-19T21:34:19.906Z',
    v: 0 } ]

third-party streams

See the user-maintained list in the Bunyan wiki.

Runtime log snooping via DTrace

On systems that support DTrace (e.g., illumos derivatives like SmartOS and OmniOS, FreeBSD, Mac), Bunyan will create a DTrace provider (bunyan) that makes available the following probes:

log-trace
log-debug
log-info
log-warn
log-error
log-fatal

Each of these probes has a single argument: the string that would be written to the log. Note that when a probe is enabled, it will fire whenever the corresponding function is called, even if the level of the log message is less than that of any stream.

DTrace examples

Trace all log messages coming from any Bunyan module on the system. (The -x strsize=4k is to raise dtrace's default 256 byte buffer size because log messages are longer than typical dtrace probes.)

dtrace -x strsize=4k -qn 'bunyan*:::log-*{printf("%d: %s: %s", pid, probefunc, copyinstr(arg0))}'

Trace all log messages coming from the "wuzzle" component:

dtrace -x strsize=4k -qn 'bunyan*:::log-*/strstr(this->str = copyinstr(arg0), "\"component\":\"wuzzle\"") != NULL/{printf("%s", this->str)}'

Aggregate debug messages from process 1234, by message:

dtrace -x strsize=4k -n 'bunyan1234:::log-debug{@[copyinstr(arg0)] = count()}'

Have the bunyan CLI pretty-print the traced logs:

dtrace -x strsize=4k -qn 'bunyan1234:::log-*{printf("%s", copyinstr(arg0))}' | bunyan

A convenience handle has been made for this:

bunyan -p 1234

On systems that support the jstack action via a node.js helper, get a stack backtrace for any debug message that includes the string "danger!":

dtrace -x strsize=4k -qn 'log-debug/strstr(copyinstr(arg0), "danger!") != NULL/{printf("\n%s", copyinstr(arg0)); jstack()}'

Output of the above might be:

{"name":"foo","hostname":"763bf293-d65c-42d5-872b-4abe25d5c4c7.local","pid":12747,"level":20,"msg":"danger!","time":"2012-10-30T18:28:57.115Z","v":0}

          node`0x87e2010
          DTraceProviderBindings.node`usdt_fire_probe+0x32
          DTraceProviderBindings.node`_ZN4node11DTraceProbe5_fireEN2v85LocalINS1_5ValueEEE+0x32d
          DTraceProviderBindings.node`_ZN4node11DTraceProbe4FireERKN2v89ArgumentsE+0x77
          << internal code >>
          (anon) as (anon) at /root/node-bunyan/lib/bunyan.js position 40484
          << adaptor >>
          (anon) as doit at /root/my-prog.js position 360
          (anon) as list.ontimeout at timers.js position 4960
          << adaptor >>
          << internal >>
          << entry >>
          node`_ZN2v88internalL6InvokeEbNS0_6HandleINS0_10JSFunctionEEENS1_INS0_6ObjectEEEiPS5_Pb+0x101
          node`_ZN2v88internal9Execution4CallENS0_6HandleINS0_6ObjectEEES4_iPS4_Pbb+0xcb
          node`_ZN2v88Function4CallENS_6HandleINS_6ObjectEEEiPNS1_INS_5ValueEEE+0xf0
          node`_ZN4node12MakeCallbackEN2v86HandleINS0_6ObjectEEENS1_INS0_8FunctionEEEiPNS1_INS0_5ValueEEE+0x11f
          node`_ZN4node12MakeCallbackEN2v86HandleINS0_6ObjectEEENS1_INS0_6StringEEEiPNS1_INS0_5ValueEEE+0x66
          node`_ZN4node9TimerWrap9OnTimeoutEP10uv_timer_si+0x63
          node`uv__run_timers+0x66
          node`uv__run+0x1b
          node`uv_run+0x17
          node`_ZN4node5StartEiPPc+0x1d0
          node`main+0x1b
          node`_start+0x83

          node`0x87e2010
          DTraceProviderBindings.node`usdt_fire_probe+0x32
          DTraceProviderBindings.node`_ZN4node11DTraceProbe5_fireEN2v85LocalINS1_5ValueEEE+0x32d
          DTraceProviderBindings.node`_ZN4node11DTraceProbe4FireERKN2v89ArgumentsE+0x77
          << internal code >>
          (anon) as (anon) at /root/node-bunyan/lib/bunyan.js position 40484
          << adaptor >>
          (anon) as doit at /root/my-prog.js position 360
          (anon) as list.ontimeout at timers.js position 4960
          << adaptor >>
          << internal >>
          << entry >>
          node`_ZN2v88internalL6InvokeEbNS0_6HandleINS0_10JSFunctionEEENS1_INS0_6ObjectEEEiPS5_Pb+0x101
          node`_ZN2v88internal9Execution4CallENS0_6HandleINS0_6ObjectEEES4_iPS4_Pbb+0xcb
          node`_ZN2v88Function4CallENS_6HandleINS_6ObjectEEEiPNS1_INS_5ValueEEE+0xf0
          node`_ZN4node12MakeCallbackEN2v86HandleINS0_6ObjectEEENS1_INS0_8FunctionEEEiPNS1_INS0_5ValueEEE+0x11f
          node`_ZN4node12MakeCallbackEN2v86HandleINS0_6ObjectEEENS1_INS0_6StringEEEiPNS1_INS0_5ValueEEE+0x66
          node`_ZN4node9TimerWrap9OnTimeoutEP10uv_timer_si+0x63
          node`uv__run_timers+0x66
          node`uv__run+0x1b
          node`uv_run+0x17
          node`_ZN4node5StartEiPPc+0x1d0
          node`main+0x1b
          node`_start+0x83

Runtime environments

Node-bunyan supports running in a few runtime environments:

Support for other runtime environments is welcome. If you have suggestions, fixes, or mentions that node-bunyan already works in some other JavaScript runtime, please open an issue or a pull request.

The primary target is Node.js. It is the only environment in which I regularly test. If you have suggestions for how to automate testing for other environments, I'd appreciate feedback on this automated testing issue.

Browserify

As the Browserify site says it "lets you require('modules') in the browser by bundling up all of your dependencies." It is a build tool to run on your node.js script to bundle up your script and all its node.js dependencies into a single file that is runnable in the browser via:

<script src="play.browser.js"></script>

As of version 1.1.0, node-bunyan supports being run via Browserify. The default stream when running in the browser is one that emits raw log records to console.log/info/warn/error.

Here is a quick example showing you how you can get this working for your script.

  1. Get browserify and bunyan installed in your module:

    $ npm install browserify bunyan
  2. An example script using Bunyan, "play.js":

    var bunyan = require('bunyan');
    var log = bunyan.createLogger({name: 'play', level: 'debug'});
    log.trace('this one does not emit');
    log.debug('hi on debug');   // console.log
    log.info('hi on info');     // console.info
    log.warn('hi on warn');     // console.warn
    log.error('hi on error');   // console.error
  3. Build this into a bundle to run in the browser, "play.browser.js":

    $ ./node_modules/.bin/browserify play.js -o play.browser.js
  4. Put that into an HTML file, "play.html":

    <!DOCTYPE html>
    <html>
    <head>
      <meta charset="utf-8">
      <script src="play.browser.js"></script>
    </head>
    <body>
      <div>hi</div>
    </body>
    </html>
  5. Open that in your browser and open your browser console:

    $ open play.html

Here is what it looks like in Firefox's console: Bunyan + Browserify in the Firefox console

For some, the raw log records might not be desired. To have a rendered log line you'll want to add your own stream, starting with something like this:

var bunyan = require('./lib/bunyan');

function MyRawStream() {}
MyRawStream.prototype.write = function (rec) {
    console.log('[%s] %s: %s',
        rec.time.toISOString(),
        bunyan.nameFromLevel[rec.level],
        rec.msg);
}

var log = bunyan.createLogger({
    name: 'play',
    streams: [
        {
            level: 'info',
            stream: new MyRawStream(),
            type: 'raw'
        }
    ]
});

log.info('hi on info');

webpack

To include bunyan in your webpack bundle you need to tell webpack to ignore the optional dependencies that are unavailable in browser environments.

Mark the following dependencies as externals in your webpack configuration file to exclude them from the bundle:

module: {
    externals: ['dtrace-provider', 'fs', 'mv', 'os', 'source-map-support']
}

Versioning

All versions are <major>.<minor>.<patch> which will be incremented for breaking backward compat and major reworks, new features without breaking change, and bug fixes, respectively. tl;dr: Semantic versioning.

License

MIT.

See Also

See the user-maintained list of Bunyan-related software in the Bunyan wiki.

node-bunyan's People

Contributors

ad-si avatar andreineculau avatar aray12 avatar bcantrill avatar blai avatar bwknight877 avatar cb1kenobi avatar chad3814 avatar cncolder avatar connor4312 avatar cterse avatar danieljuhl avatar denisizmaylov avatar florisvink avatar gswalden avatar ionicabizau avatar isaacs avatar jnordberg avatar leedm777 avatar markstos avatar matomesc avatar melloc avatar michaelnisi avatar mlucool avatar pfmooney avatar psfrankie avatar rmg avatar sethpollack avatar srokap avatar trentm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

node-bunyan's Issues

cli: Filter based on log level

It'd be super useful to have the cli tool be able to filter based on a specific log level. Then I can have one terminal showing only errors, and another showing warnings or info, etc.

install pain on Windows

npm install bunyan fails on Windows if don't have Python:

C:\Users\Administrator\trent\tmp>npm install bunyan
npm WARN package.json [email protected] No README.md file found!
npm http GET https://registry.npmjs.org/bunyan
npm http 304 https://registry.npmjs.org/bunyan
npm http GET https://registry.npmjs.org/bunyan/-/bunyan-0.17.0.tgz
npm http 200 https://registry.npmjs.org/bunyan/-/bunyan-0.17.0.tgz
npm http GET https://registry.npmjs.org/dtrace-provider/0.2.4
npm http GET https://registry.npmjs.org/mv/0.0.4
npm http 200 https://registry.npmjs.org/mv/0.0.4
npm http GET https://registry.npmjs.org/mv/-/mv-0.0.4.tgz
npm http 200 https://registry.npmjs.org/dtrace-provider/0.2.4
npm http GET https://registry.npmjs.org/dtrace-provider/-/dtrace-provider-0.2.4.
tgz
npm http 200 https://registry.npmjs.org/mv/-/mv-0.0.4.tgz
npm http 200 https://registry.npmjs.org/dtrace-provider/-/dtrace-provider-0.2.4.
tgz

> [email protected] install C:\Users\Administrator\trent\tmp\node_modules\bu
nyan\node_modules\dtrace-provider
> node-gyp rebuild


C:\Users\Administrator\trent\tmp\node_modules\bunyan\node_modules\dtrace-provide
r>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_mo
dules\node-gyp\bin\node-gyp.js" rebuild
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYT
HON env variable.
gyp ERR! stack     at failNoPython (C:\Program Files\nodejs\node_modules\npm\nod
e_modules\node-gyp\lib\configure.js:113:14)
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node
-gyp\lib\configure.js:82:11
gyp ERR! stack     at Object.oncomplete (fs.js:297:15)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modu
les\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Administrator\trent\tmp\node_modules\bunyan\node_modules\d
trace-provider
gyp ERR! node -v v0.8.17
gyp ERR! node-gyp -v v0.8.2
gyp ERR! not ok
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! `cmd "/c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the dtrace-provider package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls dtrace-provider
npm ERR! There is likely additional logging output above.

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "bunyan"
npm ERR! cwd C:\Users\Administrator\trent\tmp
npm ERR! node -v v0.8.17
npm ERR! npm -v 1.2.0
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\Users\Administrator\trent\tmp\npm-debug.log
npm ERR! not ok code 0

The intention of the dep on node-dtrace-provider is to encourage getting it. IMO, it shouldn't fail if Python is missing.

Also reported on another ticket (issue #60) is that Windows install fails if don't have a C compiler (e.g. Visual Studio) installed. Also want to fix that.

Option to output real JSON

The "json" output isn't actually JSON; it's a bunch of JSON objects concatenated together.

It would be great to have an option for the CLI tool that transforms raw logs into real JSON, by simply wrapping them in [ and ], plus inserting , as needed. In case that wasn't super-clear, algorithmically it would be

var realJson = "[" + rawLogs.split("\n").join(",") + "]";

This would then allow direct log analysis with stuff like

$ cat mylog.log | bunyan -o real-json > mylog.json
$ node
> var logs = require("./mylog.json");
undefined
> var errors = logs.filter(function (x) { return x.res.statusCode === 500; });
undefined
> errors.map(function (x) { return x.req.headers["authorization"]; });
[ ... ]

Installing fails when there is a space in the path

When doing npm install -d on a path that contains a space, the following error is thrown:

npm http GET https://registry.npmjs.org/dtrace-provider/0.2.4
npm http 304 https://registry.npmjs.org/dtrace-provider/0.2.4
npm info install [email protected] into /path/with space/to/node_modules/bunyan
npm info installOne [email protected]
npm info /path/with space/to/node_modules/bunyan/node_modules/dtrace-provider unbuild
npm info preinstall [email protected]
npm info build /path/with space/to/node_modules/bunyan/node_modules/dtrace-provider
npm info linkStuff [email protected]
npm info install [email protected]

> [email protected] install /path/with space/to/node_modules/bunyan/node_modules/dtrace-provider
> node-gyp rebuild

gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info spawn python
gyp info spawn args [ '/Users/user/.node-gyp/0.8.8/tools/gyp/gyp',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/path/with space/to/node_modules/bunyan/node_modules/dtrace-provider/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/user/.node-gyp/0.8.8/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/user/.node-gyp/0.8.8',
gyp info spawn args   '-Dmodule_root_dir=/path/with space/to/node_modules/bunyan/node_modules/dtrace-provider',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  ACTION binding_gyp_libusdt_target_build_libusdt .
/bin/sh: space/to/node_modules/bunyan/node_modules/dtrace-provider/build/Release/lib.host:/path/with: No such file or directory
Using node: /usr/local/bin/node
Building libusdt for x86_64
rm -f *.gch
rm -f *.o
rm -f libusdt.a
rm -f test_usdt
rm -f test_usdt32
rm -f test_usdt64
gcc -O2 -arch x86_64   -c -o usdt.o usdt.c
gcc -O2 -arch x86_64   -c -o usdt_dof_file.o usdt_dof_file.c
gcc -arch x86_64 -o usdt_tracepoints.o -c usdt_tracepoints_x86_64.s
gcc -O2 -arch x86_64   -c -o usdt_probe.o usdt_probe.c
gcc -O2 -arch x86_64   -c -o usdt_dof.o usdt_dof.c
gcc -O2 -arch x86_64   -c -o usdt_dof_sections.o usdt_dof_sections.c
rm -f libusdt.a
ar cru libusdt.a usdt.o usdt_dof_file.o usdt_tracepoints.o usdt_probe.o usdt_dof.o usdt_dof_sections.o 
ranlib libusdt.a
  TOUCH Release/obj.target/libusdt.stamp.node
  CXX(target) Release/obj.target/DTraceProviderBindings/dtrace_provider.o
  CXX(target) Release/obj.target/DTraceProviderBindings/dtrace_probe.o
  SOLINK_MODULE(target) Release/DTraceProviderBindings.node
clang: error: no such file or directory: 'OAE/ui/newOAE/Hilary/node_modules/bunyan/node_modules/dtrace-provider/libusdt'
make: *** [Release/DTraceProviderBindings.node] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:219:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:91:17)
gyp ERR! stack     at Process._handle.onexit (child_process.js:674:10)
gyp ERR! System Darwin 11.4.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /path/with space/to/node_modules/bunyan/node_modules/dtrace-provider
gyp ERR! node -v v0.8.8
gyp ERR! node-gyp -v v0.6.7
gyp ERR! not ok 
npm info [email protected] Failed to exec install script
npm info /path/with space/to/node_modules/bunyan/node_modules/dtrace-provider unbuild
npm info preuninstall [email protected]
npm info uninstall [email protected]
npm info postuninstall [email protected]
npm info /path/with space/to/node_modules/bunyan unbuild
npm info preuninstall [email protected]
npm info uninstall [email protected]
npm info postuninstall [email protected]
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the dtrace-provider package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls dtrace-provider
npm ERR! There is likely additional logging output above.

npm ERR! System Darwin 11.4.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-d"
npm ERR! cwd /path/with space/to
npm ERR! node -v v0.8.8
npm ERR! npm -v 1.1.59
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /path/with space/to/npm-debug.log
npm ERR! not ok code 0

The error goes away when removing the space from the path.

Bunyan tool: --color flag doesn't work with -o flag

Hello,

node xxx.js | ./node_modules/.bin/bunyan works with --color flad alone and the -o flag alone. However, when I use the two of them together, color highlighting doesn't work anymore.

Not a big issue of course, but I thought I would let you know ! Thanks for this nice little program.
Louis

DEBUG et al defines in '-c' scripts bleed into log records

This was in 0.11.1 release (now pulled from npm):

[21:57:54 trentm@banana:~/tm/node-bunyan (master)]
$ bunyan all.log 
[2012-02-08T22:56:50.856Z] TRACE: myservice/123 on example.com: My message
[2012-02-08T22:56:51.856Z] DEBUG: myservice/123 on example.com: My message
[2012-02-08T22:56:52.856Z]  INFO: myservice/123 on example.com: My message
[2012-02-08T22:56:53.856Z]  WARN: myservice/123 on example.com: My message
[2012-02-08T22:56:54.856Z] ERROR: myservice/123 on example.com: My message
[2012-02-08T22:56:55.856Z] LVL55: myservice/123 on example.com: My message
[2012-02-08T22:56:56.856Z] FATAL: myservice/123 on example.com: My message
[21:57:55 trentm@banana:~/tm/node-bunyan (master)]
$ bunyan -l fatal all.log 
[2012-02-08T22:56:56.856Z] FATAL: myservice/123 on example.com: My message
[21:57:58 trentm@banana:~/tm/node-bunyan (master)]
$ bunyan -c 'level == FATAL' all.log 
[2012-02-08T22:56:56.856Z] FATAL: myservice/123 on example.com: My message (WARN=40, INFO=30, ERROR=50, FATAL=60, TRACE=10, DEBUG=20)

That bleed of WARN, INFO et al is no good.
The only way I see to get rid of those after the fact is to:

delete rec.DEBUG;
delete rec.INFO;
...

for every log record after a conditional check. That's too much overhead I think (unless I'm proven wrong on that).

I'm pulling the feature.

`log.info(buffer)` goes boom

$ cat foo.js
var b = require('./lib/bunyan');
var log = b.createLogger({name: 'foo'})
var data = new Buffer([72,84,84,80,47,49,46,49]);
log.info(data);

$ node foo.js
{"0":72,"1":84,"2":84,"3":80,"4":47,"5":49,"6":46,"7":49,"name":"foo","hostname":"banana.local","pid":41422,"level":30,"length":8,"parent":{"0":10,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":10,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":128,"17":63,"18":6,"19":1,"20":1,"21":0,"22":0,"23":0,"24":96,"25":246,"26":6,"27":1,"28":1,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":107,"37":22,"38":0,"39":0,"40":48,"41":17,"42":83,"43":0,"44":1,"45":0,"46":0,"47":0,"48":6,"49":0,"50":0,"51":0,"52":7,"53":0,"54":0,"55":0,"56":136,"57":63,"58":6,"59":1,"60":1,"61":0,"62":0,"63":0,"64":48,"65":5,"66":83,"67":0,"68":1,"69":0,"70":0,"71":0,"72":8,"73":0,"74":0,"75":0,"76":9,"77":0,"78":0,"79":0,"80":0,"81":234,"82":7,"83":1,"84":1,"85":0,"86":0,"87":0,"88":40,"89":234,"90":7,"91":1,"92":1,"93":0,"94":0,"95":0,"96":114,"97":22,"98":0,"99":0,"100":1,"101":0,"102":0,"103":0,"104":1,"105":0,"106":0,"107":0,"108":0,"109":0,"110":0,"111":0,"112":128,"113":63,"114":6,"115":1,"116":1,"117":0,"118":0,"119":0,"120":136,"121":234,"122":7,"123":1,"124":1,"125":0,"126":0,"127":0,"128":4,"129":0,"130":0,"131":0,"132":2,"133":0,"134":0,"135":0,"136":168,"137":234,"138":7,"139":1,"140":1,"141":0,"142":0,"143":0,"144":32,"145":235,"146":7,"147":1,"148":1,"149":0,"150":0,"151":0,"152":114,"153":22,"154":0,"155":0,"156":1,"157":0,"158":0,"159":0,"160":1,"161":0,"162":0,"163":0,"164":0,"165":0,"166":0,"167":0,"168":48,"169":19,"170":83,"171":0,"172":1,"173":0,"174":0,"175":0,"176":10,"177":0,"178":0,"179":0,"180":11,"181":0,"182":0,"183":0,"184":144,"185":63,"186":6,"187":1,"188":1,"189":0,"190":0,"191":0,"192":160,"193":233,"194":7,"195":1,"196":1,"197":0,"198":0,"199":0,"200":0,"201":0,"202":0,"203":1,"204":121,"205":22,"206":0,"207":0,"208":48,"209":19,"210":83,"211":0,"212":1,"213":0,"214":0,"215":0,"216":12,"217":0,"218":0,"219":0,"220":13,"221":0,"222":0,"223":0,"224":152,"225":63,"226":6,"227":1,"228":1,"229":0,"230":0,"231":0,"232":208,"233":233,"234":7,"235":1,"236":1,"237":0,"238":0,"239":0,"240":0,"241":0,"242":0,"243":1,"244":125,"245":22,"246":0,"247":0,"248":48,"249":19,"250":83,"251":0,"252":1,"253":0,"254":0,"255":0,"256":14,"257":0,"258":0,"259":0,"260":15,"261":0,"262":0,"263":0,"264":160,"265":63,"266":6,"267":1,"268":1,"269":0,"270":0,"271":0,"272":136,"273":227,"274":7,"275":1,"276":1,"277":0,"278":0,"279":0,"280":0,"281":0,"282":0,"283":1,"284":137,"285":22,"286":0,"287":0,"288":48,"289":249,"290":82,"291":0,"292":1,"293":0,"294":0,"295":0,"296":16,"297":0,"298":0,"299":0,"300":17,"301":0,"302":0,"303":0,"304":29,"305":0,"306":0,"307":0,"308":1,"309":0,"310":0,"311":0,"312":208,"313":234,"314":7,"315":1,"316":1,"317":0,"318":0,"319":0,"320":248,"321":234,"322":7,"323":1,"324":1,"325":0,"326":0,"327":0,"328":134,"329":22,"330":0,"331":0,"332":18,"333":0,"334":0,"335":0,"336":48,"337":3,"338":83,"339":0,"340":1,"341":0,"342":0,"343":0,"344":19,"345":0,"346":0,"347":0,"348":20,"349":0,"350":0,"351":0,"352":64,"353":234,"354":7,"355":1,"356":1,"357":0,"358":0,"359":0,"360":120,"361":234,"362":7,"363":1,"364":1,"365":0,"366":0,"367":0,"368":115,"369":22,"370":0,"371":0,"372":0,"373":0,"374":0,"375":0,"376":0,"377":0,"378":0,"379":0,"380":1,"381":0,"382":0,"383":0,"384":1,"385":0,"386":0,"387":0,"388":0,"389":0,"390":0,"391":0,"392":0,"393":0,"394":0,"395":0,"396":0,"397":0,"398":0,"399":0,"400":0,"401":0,"402":0,"403":0,"404":0,"405":0,"406":0,"407":0,"408":0,"409":0,"410":0,"411":0,"412":0,"413":0,"414":0,"415":0,"416":21,"417":0,"418":0,"419":0,"420":1,"421":0,"422":0,"423":0,"424":112,"425":50,"426":83,"427":0,"428":1,"429":0,"430":0,"431":0,"432":107,"433":22,"434":0,"435":0,"436":1,"437":0,"438":0,"439":0,"440":80,"441":235,"442":7,"443":1,"444":1,"445":0,"446":0,"447":0,"448":48,"449":25,"450":83,"451":0,"452":1,"453":0,"454":0,"455":0,"456":100,"457":1,"458":0,"459":0,"460":101,"461":1,"462":0,"463":0,"464":8,"465":110,"466":2,"467":1,"468":1,"469":0,"470":0,"471":0,"472":80,"473":230,"474":7,"475":1,"476":1,"477":0,"478":0,"479":0,"480":80,"481":233,"482":7,"483":1,"484":1,"485":0,"486":0,"487":0,"488":0,"489":0,"490":0,"491":0,"492":0,"493":0,"494":0,"495":0,"496":0,"497":235,"498":7,"499":1,"500":1,"501":0,"502":0,"503":0,"504":80,"505":107,"506":2,"507":1,"508":1,"509":0,"510":0,"511":0,"512":2,"513":0,"514":0,"515":0,"516":88,"517":22,"518":0,"519":0,"520":145,"521":22,"522":0,"523":0,"524":80,"525":22,"526":0,"527":0,"528":184,"529":63,"530":6,"531":1,"532":1,"533":0,"534":0,"535":0,"536":1,"537":1,"538":1,"539":0,"540":1,"541":0,"542":0,"543":0,"544":48,"545":9,"546":83,"547":0,"548":1,"549":0,"550":0,"551":0,"552":102,"553":1,"554":0,"555":0,"556":103,"557":1,"558":0,"559":0,"560":16,"561":0,"562":0,"563":0,"564":1,"565":0,"566":0,"567":0,"568":24,"569":230,"570":7,"571":1,"572":1,"573":0,"574":0,"575":0,"576":192,"577":235,"578":7,"579":1,"580":1,"581":0,"582":0,"583":0,"584":78,"585":22,"586":0,"587":0,"588":1,"589":0,"590":0,"591":0,"592":0,"593":0,"594":0,"595":0,"596":0,"597":0,"598":0,"599":0,"600":255,"601":255,"602":255,"603":255,"604":104,"605":1,"606":0,"607":0,"608":0,"609":0,"610":0,"611":0,"612":103,"613":1,"614":0,"615":0,"616":1,"617":0,"618":0,"619":0,"620":0,"621":0,"622":0,"623":0,"624":112,"625":50,"626":83,"627":0,"628":1,"629":0,"630":0,"631":0,"632":69,"633":22,"634":0,"635":0,"636":1,"637":0,"638":0,"639":0,"640":32,"641":236,"642":7,"643":1,"644":1,"645":0,"646":0,"647":0,"648":168,"649":241,"650":6,"651":1,"652":1,"653":0,"654":0,"655":0,"656":216,"657":243,"658":6,"659":1,"660":1,"661":0,"662":0,"663":0,"664":8,"665":246,"666":6,"667":1,"668":1,"669":0,"670":0,"671":0,"672":136,"673":248,"674":6,"675":1,"676":1,"677":0,"678":0,"679":0,"680":8,"681":251,"682":6,"683":1,"684":1,"685":0,"686":0,"687":0,"688":208,"689":252,"690":6,"691":1,"692":1,"693":0,"694":0,"695":0,"696":24,"697":3,"698":7,"699":1,"700":1,"701":0,"702":0,"703":0,"704":152,"705":5,"706":7,"707":1,"708":1,"709":0,"710":0,"711":0,"712":112,"713":7,"714":7,"715":1,"716":1,"717":0,"718":0,"719":0,"720":248,"721":11,"722":7,"723":1,"724":1,"725":0,"726":0,"727":0,"728":104,"729":19,"730":7,"731":1,"732":1,"733":0,"734":0,"735":0,"736":40,"737":26,"738":7,"739":1,"740":1,"741":0,"742":0,"743":0,"744":232,"745":32,"746":7,"747":1,"748":1,"749":0,"750":0,"751":0,"752":168,"753":39,"754":7,"755":1,"756":1,"757":0,"758":0,"759":0,"760":64,"761":47,"762":7,"763":1,"764":1,"765":0,"766":0,"767":0,"768":0,"769":54,"770":7,"771":1,"772":1,"773":0,"774":0,"775":0,"776":192,"777":60,"778":7,"779":1,"780":1,"781":0,"782":0,"783":0,"784":216,"785":67,"786":7,"787":1,"788":1,"789":0,"790":0,"791":0,"792":24,"793":144,"794":7,"795":1,"796":1,"797":0,"798":0,"799":0,"800":64,"801":202,"802":7,"803":1,"804":1,"805":0,"806":0,"807":0,"808":112,"809":236,"810":7,"811":1,"812":1,"813":0,"814":0,"815":0,"816":104,"817":243,"818":7,"819":1,"820":1,"821":0,"822":0,"823":0,"824":112,"825":13,"826":8,"827":1,"828":1,"829":0,"830":0,"831":0,"832":80,"833":23,"834":8,"835":1,"836":1,"837":0,"838":0,"839":0,"840":232,"841":60,"842":8,"843":1,"844":1,"845":0,"846":0,"847":0,"848":200,"849":89,"850":8,"851":1,"852":1,"853":0,"854":0,"855":0,"856":32,"857":64,"858":119,"859":0,"860":1,"861":0,"862":0,"863":0,"864":72,"865":82,"866":119,"867":0,"868":1,"869":0,"870":0,"871":0,"872":80,"873":91,"874":119,"875":0,"876":1,"877":0,"878":0,"879":0,"880":168,"881":99,"882":119,"883":0,"884":1,"885":0,"886":0,"887":0,"888":176,"889":106,"890":119,"891":0,"892":1,"893":0,"894":0,"895":0,"896":48,"897":19,"898":83,"899":0,"900":1,"901":0,"902":0,"903":0,"904":105,"905":1,"906":0,"907":0,"908":106,"909":1,"910":0,"911":0,"912":192,"913":63,"914":6,"915":1,"916":1,"917":0,"918":0,"919":0,"920":96,"921":251,"922":6,"923":1,"924":1,"925":0,"926":0,"927":0,"928":0,"929":0,"930":0,"931":0,"932":148,"933":22,"934":0,"935":0,"936":48,"937":17,"938":83,"939":0,"940":1,"941":0,"942":0,"943":0,"944":107,"945":1,"946":0,"947":0,"948":108,"949":1,"950":0,"951":0,"952":200,"953":63,"954":6,"955":1,"956":1,"957":0,"958":0,"959":0,"960":48,"961":5,"962":83,"963":0,"964":1,"965":0,"966":0,"967":0,"968":109,"969":1,"970":0,"971":0,"972":110,"973":1,"974":0,"975":0,"976":128,"977":237,"978":7,"979":1,"980":1,"981":0,"982":0,"983":0,"984":168,"985":237,"986":7,"987":1,"988":1,"989":0,"990":0,"991":0,"992":150,"993":22,"994":0,"995":0,"996":1,"997":0,"998":0,"999":0,"1000":1,"1001":0,"1002":0,"1003":0,"1004":0,"1005":0,"1006":0,"1007":0,"1008":192,"1009":63,"1010":6,"1011":1,"1012":1,"1013":0,"1014":0,"1015":0,"1016":0,"1017":104,"1018":2,"1019":1,"1020":1,"1021":0,"1022":0,"1023":0,"1024":176,"1025":235,"1026":6,"1027":1,"1028":1,"1029":0,"1030":0,"1031":0,"1032":216,"1033":238,"1034":7,"1035":1,"1036":1,"1037":0,"1038":0,"1039":0,"1040":4,"1041":0,"1042":0,"1043":0,"1044":0,"1045":0,"1046":0,"1047":0,"1048":1,"1049":0,"1050":0,"1051":0,"1052":1,"1053":0,"1054":0,"1055":0,"1056":8,"1057":110,"1058":2,"1059":1,"1060":1,"1061":0,"1062":0,"1063":0,"1064":80,"1065":79,"1066":84,"1067":0,"1068":1,"1069":0,"1070":0,"1071":0,"1072":72,"1073":123,"1074":85,"1075":0,"1076":1,"1077":0,"1078":0,"1079":0,"1080":240,"1081":38,"1082":36,"1083":0,"1084":1,"1085":0,"1086":0,"1087":0,"1088":248,"1089":238,"1090":7,"1091":1,"1092":1,"1093":0,"1094":0,"1095":0,"1096":8,"1097":0,"1098":0,"1099":0,"1100":3,"1101":0,"1102":0,"1103":0,"1104":184,"1105":239,"1106":7,"1107":1,"1108":1,"1109":0,"1110":0,"1111":0,"1112":4,"1113":0,"1114":0,"1115":0,"1116":0,"1117":0,"1118":0,"1119":0,"1120":216,"1121":239,"1122":7,"1123":1,"1124":1,"1125":0,"1126":0,"1127":0,"1128":4,"1129":0,"1130":0,"1131":0,"1132":1,"1133":0,"1134":0,"1135":0,"1136":0,"1137":0,"1138":0,"1139":0,"1140":0,"1141":0,"1142":0,"1143":0,"1144":248,"1145":239,"1146":7,"1147":1,"1148":1,"1149":0,"1150":0,"1151":0,"1152":16,"1153":0,"1154":0,"1155":0,"1156":2,"1157":0,"1158":0,"1159":0,"1160":120,"1161":240,"1162":7,"1163":1,"1164":1,"1165":0,"1166":0,"1167":0,"1168":4,"1169":0,"1170":0,"1171":0,"1172":0,"1173":0,"1174":0,"1175":0,"1176":152,"1177":240,"1178":7,"1179":1,"1180":1,"1181":0,"1182":0,"1183":0,"1184":0,"1185":0,"1186":0,"1187":0,"1188":0,"1189":0,"1190":0,"1191":0,"1192":0,"1193":0,"1194":0,"1195":0,"1196":0,"1197":0,"1198":0,"1199":0,"1200":0,"1201":0,"1202":0,"1203":0,"1204":0,"1205":0,"1206":0,"1207":0,"1208":0,"1209":0,"1210":0,"1211":0,"1212":0,"1213":0,"1214":0,"1215":0,"1216":0,"1217":0,"1218":7,"1219":1,"1220":0,"1221":0,"1222":0,"1223":0,"1224":0,"1225":0,"1226":0,"1227":0,"1228":0,"1229":0,"1230":0,"1231":0,"1232":0,"1233":0,"1234":0,"1235":0,"1236":0,"1237":0,"1238":0,"1239":0,"1240":0,"1241":0,"1242":0,"1243":0,"1244":0,"1245":0,"1246":0,"1247":0,"1248":0,"1249":0,"1250":0,"1251":0,"1252":0,"1253":0,"1254":0,"1255":0,"1256":0,"1257":0,"1258":0,"1259":0,"1260":0,"1261":0,"1262":0,"1263":0,"1264":0,"1265":0,"1266":0,"1267":0,"1268":0,"1269":0,"1270":0,"1271":0,"1272":192,"1273":110,"1274":2,"1275":1,"1276":1,"1277":0,"1278":0,"1279":0,"1280":152,"1281":240,"1282":7,"1283":1,"1284":1,"1285":0,"1286":0,"1287":0,"1288":240,"1289":164,"1290":19,"1291":25,"1292":0,"1293":0,"1294":0,"1295":0,"1296":0,"1297":0,"1298":0,"1299":0,"1300":0,"1301":0,"1302":0,"1303":0,"1304":0,"1305":0,"1306":0,"1307":0,"1308":40,"1309":25,"1310":0,"1311":0,"1312":48,"1313":17,"1314":83,"1315":0,"1316":1,"1317":0,"1318":0,"1319":0,"1320":0,"1321":0,"1322":0,"1323":0,"1324":0,"1325":0,"1326":0,"1327":0,"1328":192,"1329":110,"1330":2,"1331":1,"1332":1,"1333":0,"1334":0,"1335":0,"1336":208,"1337":240,"1338":7,"1339":1,"1340":1,"1341":0,"1342":0,"1343":0,"1344":168,"1345":109,"1346":2,"1347":1,"1348":1,"1349":0,"1350":0,"1351":0,"1352":200,"1353":240,"1354":7,"1355":1,"1356":1,"1357":0,"1358":0,"1359":0,"1360":139,"1361":60,"1362":40,"1363":15,"1364":1,"1365":0,"1366":0,"1367":0,"1368":0,"1369":0,"1370":0,"1371":0,"1372":0,"1373":0,"1374":0,"1375":0,"1376":0,"1377":0,"1378":0,"1379":0,"1380":0,"1381":0,"1382":0,"1383":0,"1384":48,"1385":3,"1386":83,"1387":0,"1388":1,"1389":0,"1390":0,"1391":0,"1392":0,"1393":0,"1394":0,"1395":0,"1396":0,"1397":0,"1398":0,"1399":0,"1400":168,"1401":109,"1402":2,"1403":1,"1404":1,"1405":0,"1406":0,"1407":0,"1408":0,"1409":241,"1410":7,"1411":1,"1412":1,"1413":0,"1414":0,"1415":0,"1416":208,"1417":63,"1418":6,"1419":1,"1420":1,"1421":0,"1422":0,"1423":0,"1424":72,"1425":241,"1426":7,"1427":1,"1428":1,"1429":0,"1430":0,"1431":0,"1432":254,"1433":131,"1434":149,"1435":18,"1436":0,"1437":0,"1438":0,"1439":0,"1440":0,"1441":0,"1442":0,"1443":0,"1444":0,"1445":0,"1446":0,"1447":0,"1448":0,"1449":0,"1450":0,"1451":0,"1452":0,"1453":0,"1454":0,"1455":0,"1456":0,"1457":0,"1458":0,"1459":0,"1460":0,"1461":0,"1462":0,"1463":0,"1464":176,"1465":0,"1466":0,"1467":0,"1468":173,"1469":0,"1470":0,"1471":0,"1472":216,"1473":63,"1474":6,"1475":1,"1476":1,"1477":0,"1478":0,"1479":0,"1480":128,"1481":241,"1482":7,"1483":1,"1484":1,"1485":0,"1486":0,"1487":0,"1488":254,"1489":131,"1490":149,"1491":18,"1492":1,"1493":0,"1494":0,"1495":0,"1496":72,"1497":241,"1498":7,"1499":1,"1500":1,"1501":0,"1502":0,"1503":0,"1504":179,"1505":0,"1506":0,"1507":0,"1508":180,"1509":0,"1510":0,"1511":0,"1512":104,"1513":239,"1514":7,"1515":1,"1516":1,"1517":0,"1518":0,"1519":0,"1520":192,"1521":239,"1522":7,"1523":1,"1524":1,"1525":0,"1526":0,"1527":0,"1528":120,"1529":241,"1530":7,"1531":1,"1532":1,"1533":0,"1534":0,"1535":0,"1536":32,"1537":242,"1538":7,"1539":1,"1540":1,"1541":0,"1542":0,"1543":0,"1544":0,"1545":0,"1546":0,"1547":0,"1548":1,"1549":0,"1550":0,"1551":0,"1552":128,"1553":241,"1554":7,"1555":1,"1556":1,"1557":0,"1558":0,"1559":0,"1560":4,"1561":0,"1562":0,"1563":0,"1564":1,"1565":0,"1566":0,"1567":0,"1568":64,"1569":240,"1570":7,"1571":1,"1572":1,"1573":0,"1574":0,"1575":0,"1576":0,"1577":0,"1578":0,"1579":0,"1580":0,"1581":0,"1582":0,"1583":0,"1584":176,"1585":241,"1586":7,"1587":1,"1588":1,"1589":0,"1590":0,"1591":0,"1592":88,"1593":242,"1594":7,"1595":1,"1596":1,"1597":0,"1598":0,"1599":0,"1600":48,"1601":17,"1602":83,"1603":0,"1604":1,"1605":0,"1606":0,"1607":0,"1608":181,"1609":0,"1610":0,"1611":0,"1612":182,"1613":0,"1614":0,"1615":0,"1616":160,"1617":62,"1618":6,"1619":1,"1620":1,"1621":0,"1622":0,"1623":0,"1624":48,"1625":3,"1626":83,"1627":0,"1628":1,"1629":0,"1630":0,"1631":0,"1632":183,"1633":0,"1634":0,"1635":0,"1636":184,"1637":0,"1638":0,"1639":0,"1640":216,"1641":239,"1642":7,"1643":1,"1644":1,"1645":0,"1646":0,"1647":0,"1648":16,"1649":240,"1650":7,"1651":1,"1652":1,"1653":0,"1654":0,"1655":0,"1656":49,"1657":25,"1658":0,"1659":0,"1660":0,"1661":0,"1662":0,"1663":0,"1664":0,"1665":0,"1666":0,"1667":0,"1668":0,"1669":0,"1670":0,"1671":0,"1672":1,"1673":0,"1674":0,"1675":0,"1676":0,"1677":0,"1678":0,"1679":0,"1680":0,"1681":0,"1682":0,"1683":0,"1684":0,"1685":0,"1686":0,"1687":0,"1688":248,"1689":237,"1690":7,"1691":1,"1692":1,"1693":0,"1694":0,"1695":0,"1696":192,"1697":110,"1698":2,"1699":1,"1700":1,"1701":0,"1702":0,"1703":0,"1704":0,"1705":0,"1706":0,"1707":0,"1708":1,"1709":0,"1710":0,"1711":0,"1712":1,"1713":0,"1714":0,"1715":0,"1716":255,"1717":255,"1718":255,"1719":255,"1720":0,"1721":0,"1722":0,"1723":0,"1724":0,"1725":0,"1726":0,"1727":0,"1728":0,"1729":0,"1730":0,"1731":1,"1732":1,"1733":0,"1734":0,"1735":0,"1736":248,"1737":237,"1738":7,"1739":1,"1740":1,"1741":0,"1742":0,"1743":0,"1744":168,"1745":109,"1746":2,"1747":1,"1748":1,"1749":0,"1750":0,"1751":0,"1752":0,"1753":0,"1754":0,"1755":0,"1756":2,"1757":0,"1758":0,"1759":0,"1760":0,"1761":0,"1762":0,"1763":0,"1764":255,"1765":255,"1766":255,"1767":255,"1768":0,"1769":0,"1770":0,"1771":0,"1772":0,"1773":0,"1774":0,"1775":0,"1776":1,"1777":0,"1778":0,"1779":0,"1780":0,"1781":0,"1782":0,"1783":0,"1784":8,"1785":241,"1786":7,"1787":1,"1788":1,"1789":0,"1790":0,"1791":0,"1792":8,"1793":0,"1794":0,"1795":0,"1796":1,"1797":0,"1798":0,"1799":0,"1800":160,"1801":242,"1802":7,"1803":1,"1804":1,"1805":0,"1806":0,"1807":0,"1808":0,"1809":0,"1810":0,"1811":0,"1812":2,"1813":0,"1814":0,"1815":0,"1816":0,"1817":0,"1818":0,"1819":0,"1820":255,"1821":255,"1822":255,"1823":255,"1824":0,"1825":0,"1826":0,"1827":0,"1828":0,"1829":0,"1830":0,"1831":0,"1832":1,"1833":0,"1834":0,"1835":0,"1836":1,"1837":0,"1838":0,"1839":0,"1840":64,"1841":241,"1842":7,"1843":1,"1844":1,"1845":0,"1846":0,"1847":0,"1848":8,"1849":0,"1850":0,"1851":0,"1852":1,"1853":0,"1854":0,"1855":0,"1856":216,"1857":242,"1858":7,"1859":1,"1860":1,"1861":0,"1862":0,"1863":0,"1864":248,"1865":237,"1866":7,"1867":1,"1868":1,"1869":0,"1870":0,"1871":0,"1872":208,"1873":63,"1874":6,"1875":1,"1876":1,"1877":0,"1878":0,"1879":0,"1880":0,"1881":0,"1882":0,"1883":0,"1884":0,"1885":0,"1886":0,"1887":0,"1888":1,"1889":0,"1890":0,"1891":0,"1892":0,"1893":0,"1894":0,"1895":0,"1896":0,"1897":0,"1898":0,"1899":0,"1900":0,"1901":0,"1902":0,"1903":0,"1904":1,"1905":0,"1906":1,"1907":1,"1908":1,"1909":0,"1910":0,"1911":0,"1912":48,"1913":19,"1914":83,"1915":0,"1916":1,"1917":0,"1918":0,"1919":0,"1920":4,"1921":0,"1922":0,"1923":0,"1924":5,"1925":0,"1926":0,"1927":0,"1928":216,"1929":63,"1930":6,"1931":1,"1932":1,"1933":0,"1934":0,"1935":0,"1936":96,"1937":246,"1938":6,"1939":1,"1940":1,"1941":0,"1942":0,"1943":0,"1944":0,"1945":0,"1946":0,"1947":0,"1948":187,"1949":22,"1950":0,"1951":0,"1952":48,"1953":17,"1954":83,"1955":0,"1956":1,"1957":0,"1958":0,"1959":0,"1960":6,"1961":0,"1962":0,"1963":0,"1964":7,"1965":0,"1966":0,"1967":0,"1968":224,"1969":63,"1970":6,"1971":1,"1972":1,"1973":0,"1974":0,"1975":0,"1976":48,"1977":5,"1978":83,"1979":0,"1980":1,"1981":0,"1982":0,"1983":0,"1984":8,"1985":0,"1986":0,"1987":0,"1988":9,"1989":0,"1990":0,"1991":0,"1992":120,"1993":241,"1994":7,"1995":1,"1996":1,"1997":0,"1998":0,"1999":0,"2000":160,"2001":241,"2002":7,"2003":1,"2004":1,"2005":0,"2006":0,"2007":0,"2008":194,"2009":22,"2010":0,"2011":0,"2012":1,"2013":0,"2014":0,"2015":0,"2016":1,"2017":0,"2018":0,"2019":0,"2020":0,"2021":0,"2022":0,"2023":0,"2024":224,"2025":63,"2026":6,"2027":1,"2028":1,"2029":0,"2030":0,"2031":0,"2032":0,"2033":242,"2034":7,"2035":1,"2036":1,"2037":0,"2038":0,"2039":0,"2040":4,"2041":0,"2042":0,"2043":0,"2044":1,"2045":0,"2046":0,"2047":0,"2048":32,"2049":242,"2050":7,"2051":1,"2052":1,"2053":0,"2054":0,"2055":0,"2056":216,"2057":241,"2058":7,"2059":1,"2060":1,"2061":0,"2062":0,"2063":0,"2064":194,"2065":22,"2066":0,"2067":0,"2068":1,"2069":0,"2070":0,"2071":0,"2072":1,"2073":0,"2074":0,"2075":0,"2076":0,"2077":0,"2078":0,"2079":0,"2080":48,"2081":19,"2082":83,"2083":0,"2084":1,"2085":0,"2086":0,"2087":0,"2088":10,"2089":0,"2090":0,"2091":0,"2092":11,"2093":0,"2094":0,"2095":0,"2096":232,"2097":63,"2098":6,"2099":1,"2100":1,"2101":0,"2102":0,"2103":0,"2104":72,"2105":241,"2106":7,"2107":1,"2108":1,"2109":0,"2110":0,"2111":0,"2112":0,"2113":0,"2114":0,"2115":1,"2116":201,"2117":22,"2118":0,"2119":0,"2120":48,"2121":3,"2122":83,"2123":0,"2124":1,"2125":0,"2126":0,"2127":0,"2128":12,"2129":0,"2130":0,"2131":0,"2132":13,"2133":0,"2134":0,"2135":0,"2136":184,"2137":241,"2138":7,"2139":1,"2140":1,"2141":0,"2142":0,"2143":0,"2144":240,"2145":241,"2146":7,"2147":1,"2148":1,"2149":0,"2150":0,"2151":0,"2152":195,"2153":22,"2154":0,"2155":0,"2156":0,"2157":0,"2158":0,"2159":0,"2160":0,"2161":0,"2162":0,"2163":0,"2164":1,"2165":0,"2166":0,"2167":0,"2168":1,"2169":0,"2170":0,"2171":0,"2172":0,"2173":0,"2174":0,"2175":0,"2176":0,"2177":0,"2178":0,"2179":0,"2180":0,"2181":0,"2182":0,"2183":0,"2184":0,"2185":0,"2186":0,"2187":0,"2188":0,"2189":0,"2190":0,"2191":0,"2192":0,"2193":0,"2194":0,"2195":0,"2196":0,"2197":0,"2198":0,"2199":0,"2200":14,"2201":0,"2202":0,"2203":0,"2204":1,"2205":0,"2206":0,"2207":0,"2208":80,"2209":42,"2210":83,"2211":0,"2212":1,"2213":0,"2214":0,"2215":0,"2216":180,"2217":22,"2218":0,"2219":0,"2220":0,"2221":0,"2222":0,"2223":0,"2224":72,"2225":242,"2226":7,"2227":1,"2228":1,"2229":0,"2230":0,"2231":0,"2232":48,"2233":25,"2234":83,"2235":0,"2236":1,"2237":0,"2238":0,"2239":0,"2240":111,"2241":1,"2242":0,"2243":0,"2244":112,"2245":1,"2246":0,"2247":0,"2248":8,"2249":110,"2250":2,"2251":1,"2252":1,"2253":0,"2254":0,"2255":0,"2256":248,"2257":237,"2258":7,"2259":1,"2260":1,"2261":0,"2262":0,"2263":0,"2264":248,"2265":240,"2266":7,"2267":1,"2268":1,"2269":0,"2270":0,"2271":0,"2272":0,"2273":0,"2274":0,"2275":0,"2276":0,"2277":0,"2278":0,"2279":0,"2280":0,"2281":242,"2282":7,"2283":1,"2284":1,"2285":0,"2286":0,"2287":0,"2288":80,"2289":107,"2290":2,"2291":1,"2292":1,"2293":0,"2294":0,"2295":0,"2296":1,"2297":0,"2298":0,"2299":0,"2300":171,"2301":22,"2302":0,"2303":0,"2304":207,"2305":22,"2306":0,"2307":0,"2308":163,"2309":22,"2310":0,"2311":0,"2312":0,"2313":64,"2314":6,"2315":1,"2316":1,"2317":0,"2318":0,"2319":0,"2320":1,"2321":1,"2322":1,"2323":0,"2324":1,"2325":0,"2326":0,"2327":0,"2328":48,"2329":9,"2330":83,"2331":0,"2332":1,"2333":0,"2334":0,"2335":0,"2336":113,"2337":1,"2338":0,"2339":0,"2340":114,"2341":1,"2342":0,"2343":0,"2344":16,"2345":0,"2346":0,"2347":0,"2348":1,"2349":0,"2350":0,"2351":0,"2352":192,"2353":237,"2354":7,"2355":1,"2356":1,"2357":0,"2358":0,"2359":0,"2360":184,"2361":242,"2362":7,"2363":1,"2364":1,"2365":0,"2366":0,"2367":0,"2368":161,"2369":22,"2370":0,"2371":0,"2372":1,"2373":0,"2374":0,"2375":0,"2376":0,"2377":0,"2378":0,"2379":0,"2380":0,"2381":0,"2382":0,"2383":0,"2384":255,"2385":255,"2386":255,"2387":255,"2388":115,"2389":1,"2390":0,"2391":0,"2392":0,"2393":0,"2394":0,"2395":0,"2396":114,"2397":1,"2398":0,"2399":0,"2400":1,"2401":0,"2402":0,"2403":0,"2404":0,"2405":0,"2406":0,"2407":0,"2408":112,"2409":50,"2410":83,"2411":0,"2412":1,"2413":0,"2414":0,"2415":0,"2416":148,"2417":22,"2418":0,"2419":0,"2420":1,"2421":0,"2422":0,"2423":0,"2424":24,"2425":243,"2426":7,"2427":1,"2428":1,"2429":0,"2430":0,"2431":0,"2432":0,"2433":104,"2434":2,"2435":1,"2436":1,"2437":0,"2438":0,"2439":0,"2440":176,"2441":235,"2442":6,"2443":1,"2444":1,"2445":0,"2446":0,"2447":0,"2448":96,"2449":244,"2450":7,"2451":1,"2452":1,"2453":0,"2454":0,"2455":0,"2456":4,"2457":0,"2458":0,"2459":0,"2460":0,"2461":0,"2462":0,"2463":0,"2464":1,"2465":0,"2466":0,"2467":0,"2468":1,"2469":0,"2470":0,"2471":0,"2472":8,"2473":64,"2474":6,"2475":1,"2476":1,"2477":0,"2478":0,"2479":0,"2480":80,"2481":79,"2482":84,"2483":0,"2484":1,"2485":0,"2486":0,"2487":0,"2488":72,"2489":123,"2490":85,"2491":0,"2492":1,"2493":0,"2494":0,"2495":0,"2496":240,"2497":38,"2498":36,"2499":0,"2500":1,"2501":0,"2502":0,"2503":0,"2504":128,"2505":244,"2506":7,"2507":1,"2508":1,"2509":0,"2510":0,"2511":0,"2512":8,"2513":0,"2514":0,"2515":0,"2516":4,"2517":0,"2518":0,"2519":0,"2520":64,"2521":245,"2522":7,"2523":1,"2524":1,"2525":0,"2526":0,"2527":0,"2528":4,"2529":0,"2530":0,"2531":0,"2532":0,"2533":0,"2534":0,"2535":0,"2536":96,"2537":245,"2538":7,"2539":1,"2540":1,"2541":0,"2542":0,"2543":0,"2544":4,"2545":0,"2546":0,"2547":0,"2548":2,"2549":0,"2550":0,"2551":0,"2552":0,"2553":0,"2554":0,"2555":0,"2556":0,"2557":0,"2558":0,"2559":0,"2560":128,"2561":245,"2562":7,"2563":1,"2564":1,"2565":0,"2566":0,"2567":0,"2568":16,"2569":0,"2570":0,"2571":0,"2572":8,"2573":0,"2574":0,"2575":0,"2576":0,"2577":246,"2578":7,"2579":1,"2580":1,"2581":0,"2582":0,"2583":0,"2584":4,"2585":0,"2586":0,"2587":0,"2588":0,"2589":0,"2590":0,"2591":0,"2592":32,"2593":246,"2594":7,"2595":1,"2596":1,"2597":0,"2598":0,"2599":0,"2600":0,"2601":0,"2602":0,"2603":0,"2604":0,"2605":0,"2606":0,"2607":0,"2608":0,"2609":0,"2610":0,"2611":0,"2612":0,"2613":0,"2614":0,"2615":0,"2616":0,"2617":0,"2618":0,"2619":0,"2620":0,"2621":0,"2622":0,"2623":0,"2624":0,"2625":0,"2626":0,"2627":0,"2628":0,"2629":0,"2630":0,"2631":0,"2632":0,"2633":0,"2634":7,"2635":1,"2636":0,"2637":0,"2638":0,"2639":0,"2640":0,"2641":0,"2642":0,"2643":0,"2644":0,"2645":0,"2646":0,"2647":0,"2648":0,"2649":0,"2650":0,"2651":0,"2652":0,"2653":0,"2654":0,"2655":0,"2656":0,"2657":0,"2658":0,"2659":0,"2660":0,"2661":0,"2662":0,"2663":0,"2664":0,"2665":0,"2666":0,"2667":0,"2668":0,"2669":0,"2670":0,"2671":0,"2672":0,"2673":0,"2674":0,"2675":0,"2676":0,"2677":0,"2678":0,"2679":0,"2680":0,"2681":0,"2682":0,"2683":0,"2684":0,"2685":0,"2686":0,"2687":0,"2688":192,"2689":110,"2690":2,"2691":1,"2692":1,"2693":0,"2694":0,"2695":0,"2696":32,"2697":246,"2698":7,"2699":1,"2700":1,"2701":0,"2702":0,"2703":0,"2704":240,"2705":164,"2706":19,"2707":25,"2708":0,"2709":0,"2710":0,"2711":0,"2712":0,"2713":0,"2714":0,"2715":0,"2716":0,"2717":0,"2718":0,"2719":0,"2720":90,"2721":25,"2722":0,"2723":0,"2724":1,"2725":0,"2726":0,"2727":0,"2728":64,"2729":244,"2730":7,"2731":1,"2732":1,"2733":0,"2734":0,"2735":0,"2736":24,"2737":64,"2738":6,"2739":1,"2740":1,"2741":0,"2742":0,"2743":0,"2744":0,"2745":247,"2746":7,"2747":1,"2748":1,"2749":0,"2750":0,"2751":0,"2752":154,"2753":21,"2754":6,"2755":26,"2756":1,"2757":0,"2758":0,"2759":0,"2760":168,"2761":109,"2762":2,"2763":1,"2764":1,"2765":0,"2766":0,"2767":0,"2768":80,"2769":246,"2770":7,"2771":1,"2772":1,"2773":0,"2774":0,"2775":0,"2776":139,"2777":60,"2778":40,"2779":15,"2780":1,"2781":0,"2782":0,"2783":0,"2784":0,"2785":0,"2786":0,"2787":0,"2788":0,"2789":0,"2790":0,"2791":0,"2792":32,"2793":64,"2794":6,"2795":1,"2796":1,"2797":0,"2798":0,"2799":0,"2800":56,"2801":247,"2802":7,"2803":1,"2804":1,"2805":0,"2806":0,"2807":0,"2808":16,"2809":64,"2810":6,"2811":1,"2812":1,"2813":0,"2814":0,"2815":0,"2816":208,"2817":246,"2818":7,"2819":1,"2820":1,"2821":0,"2822":0,"2823":0,"2824":157,"2825":76,"2826":237,"2827":10,"2828":1,"2829":0,"2830":0,"2831":0,"2832":0,"2833":0,"2834":0,"2835":0,"2836":0,"2837":0,"2838":0,"2839":0,"2840":0,"2841":0,"2842":0,"2843":0,"2844":0,"2845":0,"2846":0,"2847":0,"2848":0,"2849":244,"2850":7,"2851":1,"2852":1,"2853":0,"2854":0,"2855":0,"2856":0,"2857":0,"2858":0,"2859":0,"2860":0,"2861":0,"2862":0,"2863":0,"2864":24,"2865":64,"2866":6,"2867":1,"2868":1,"2869":0,"2870":0,"2871":0,"2872":8,"2873":247,"2874":7,"2875":1,"2876":1,"2877":0,"2878":0,"2879":0,"2880":157,"2881":76,"2882":237,"2883":10,"2884":1,"2885":0,"2886":0,"2887":0,"2888":0,"2889":0,"2890":0,"2891":0,"2892":0,"2893":0,"2894":0,"2895":0,"2896":48,"2897":9,"2898":83,"2899":0,"2900":1,"2901":0,"2902":0,"2903":0,"2904":122,"2905":1,"2906":0,"2907":0,"2908":123,"2909":1,"2910":0,"2911":0,"2912":208,"2913":246,"2914":7,"2915":1,"2916":1,"2917":0,"2918":0,"2919":0,"2920":0,"2921":247,"2922":7,"2923":1,"2924":1,"2925":0,"2926":0,"2927":0,"2928":240,"2929":244,"2930":7,"2931":1,"2932":1,"2933":0,"2934":0,"2935":0,"2936":107,"2937":22,"2938":0,"2939":0,"2940":1,"2941":0,"2942":0,"2943":0,"2944":112,"2945":247,"2946":7,"2947":1,"2948":1,"2949":0,"2950":0,"2951":0,"2952":64,"2953":248,"2954":7,"2955":1,"2956":1,"2957":0,"2958":0,"2959":0,"2960":248,"2961":248,"2962":7,"2963":1,"2964":1,"2965":0,"2966":0,"2967":0,"2968":80,"2969":249,"2970":7,"2971":1,"2972":1,"2973":0,"2974":0,"2975":0,"2976":96,"2977":250,"2978":7,"2979":1,"2980":1,"2981":0,"2982":0,"2983":0,"2984":88,"2985":251,"2986":7,"2987":1,"2988":1,"2989":0,"2990":0,"2991":0,"2992":176,"2993":251,"2994":7,"2995":1,"2996":1,"2997":0,"2998":0,"2999":0,"3000":24,"3001":253,"3002":7,"3003":1,"3004":1,"3005":0,"3006":0,"3007":0,"3008":120,"3009":248,"3010":7,"3011":1,"3012":1,"3013":0,"3014":0,"3015":0,"3016":48,"3017":249,"3018":7,"3019":1,"3020":1,"3021":0,"3022":0,"3023":0,"3024":136,"3025":249,"3026":7,"3027":1,"3028":1,"3029":0,"3030":0,"3031":0,"3032":152,"3033":250,"3034":7,"3035":1,"3036":1,"3037":0,"3038":0,"3039":0,"3040":144,"3041":251,"3042":7,"3043":1,"3044":1,"3045":0,"3046":0,"3047":0,"3048":232,"3049":251,"3050":7,"3051":1,"3052":1,"3053":0,"3054":0,"3055":0,"3056":80,"3057":253,"3058":7,"3059":1,"3060":1,"3061":0,"3062":0,"3063":0,"3064":48,"3065":5,"3066":83,"3067":0,"3068":1,"3069":0,"3070":0,"3071":0,"3072":129,"3073":1,"3074":0,"3075":0,"3076":130,"3077":1,"3078":0,"3079":0,"3080":184,"3081":245,"3082":7,"3083":1,"3084":1,"3085":0,"3086":0,"3087":0,"3088":224,"3089":245,"3090":7,"3091":1,"3092":1,"3093":0,"3094":0,"3095":0,"3096":139,"3097":25,"3098":0,"3099":0,"3100":1,"3101":0,"3102":0,"3103":0,"3104":128,"3105":243,"3106":7,"3107":1,"3108":1,"3109":0,"3110":0,"3111":0,"3112":192,"3113":110,"3114":2,"3115":1,"3116":1,"3117":0,"3118":0,"3119":0,"3120":0,"3121":0,"3122":0,"3123":0,"3124":1,"3125":0,"3126":0,"3127":0,"3128":1,"3129":0,"3130":0,"3131":0,"3132":255,"3133":255,"3134":255,"3135":255,"3136":0,"3137":0,"3138":0,"3139":0,"3140":0,"3141":0,"3142":0,"3143":0,"3144":0,"3145":0,"3146":0,"3147":0,"3148":0,"3149":0,"3150":0,"3151":0,"3152":128,"3153":243,"3154":7,"3155":1,"3156":1,"3157":0,"3158":0,"3159":0,"3160":168,"3161":109,"3162":2,"3163":1,"3164":1,"3165":0,"3166":0,"3167":0,"3168":0,"3169":0,"3170":0,"3171":0,"3172":2,"3173":0,"3174":0,"3175":0,"3176":0,"3177":0,"3178":0,"3179":0,"3180":255,"3181":255,"3182":255,"3183":255,"3184":0,"3185":0,"3186":0,"3187":0,"3188":0,"3189":0,"3190":0,"3191":0,"3192":1,"3193":0,"3194":0,"3195":0,"3196":0,"3197":0,"3198":0,"3199":0,"3200":144,"3201":246,"3202":7,"3203":1,"3204":1,"3205":0,"3206":0,"3207":0,"3208":8,"3209":0,"3210":0,"3211":0,"3212":1,"3213":0,"3214":0,"3215":0,"3216":48,"3217":247,"3218":7,"3219":1,"3220":1,"3221":0,"3222":0,"3223":0,"3224":0,"3225":0,"3226":0,"3227":0,"3228":2,"3229":0,"3230":0,"3231":0,"3232":0,"3233":0,"3234":0,"3235":0,"3236":255,"3237":255,"3238":255,"3239":255,"3240":0,"3241":0,"3242":0,"3243":0,"3244":0,"3245":0,"3246":0,"3247":0,"3248":1,"3249":0,"3250":0,"3251":1,"3252":1,"3253":0,"3254":0,"3255":0,"3256":200,"3257":246,"3258":7,"3259":1,"3260":1,"3261":0,"3262":0,"3263":0,"3264":8,"3265":0,"3266":0,"3267":0,"3268":1,"3269":0,"3270":0,"3271":0,"3272":104,"3273":247,"3274":7,"3275":1,"3276":1,"3277":0,"3278":0,"3279":0,"3280":128,"3281":243,"3282":7,"3283":1,"3284":1,"3285":0,"3286":0,"3287":0,"3288":16,"3289":64,"3290":6,"3291":1,"3292":1,"3293":0,"3294":0,"3295":0,"3296":0,"3297":0,"3298":0,"3299":0,"3300":0,"3301":0,"3302":0,"3303":0,"3304":1,"3305":0,"3306":0,"3307":0,"3308":0,"3309":0,"3310":0,"3311":0,"3312":0,"3313":0,"3314":0,"3315":0,"3316":0,"3317":0,"3318":0,"3319":0,"3320":1,"3321":0,"3322":1,"3323":0,"3324":6,"3325":0,"3326":0,"3327":0,"3328":128,"3329":243,"3330":7,"3331":1,"3332":1,"3333":0,"3334":0,"3335":0,"3336":24,"3337":64,"3338":6,"3339":1,"3340":1,"3341":0,"3342":0,"3343":0,"3344":0,"3345":0,"3346":0,"3347":0,"3348":0,"3349":0,"3350":0,"3351":0,"3352":1,"3353":0,"3354":0,"3355":0,"3356":1,"3357":0,"3358":0,"3359":0,"3360":0,"3361":0,"3362":0,"3363":0,"3364":0,"3365":0,"3366":0,"3367":0,"3368":1,"3369":0,"3370":1,"3371":0,"3372":0,"3373":0,"3374":0,"3375":0,"3376":16,"3377":39,"3378":83,"3379":0,"3380":1,"3381":0,"3382":0,"3383":0,"3384":239,"3385":22,"3386":0,"3387":0,"3388":1,"3389":0,"3390":0,"3391":0,"3392":0,"3393":0,"3394":0,"3395":0,"3396":0,"3397":0,"3398":0,"3399":0,"3400":0,"3401":0,"3402":0,"3403":0,"3404":0,"3405":0,"3406":0,"3407":0,"3408":0,"3409":0,"3410":0,"3411":0,"3412":4,"3413":0,"3414":0,"3415":0,"3416":5,"3417":0,"3418":0,"3419":0,"3420":0,"3421":0,"3422":0,"3423":0,"3424":152,"3425":247,"3426":7,"3427":1,"3428":1,"3429":0,"3430":0,"3431":0,"3432":192,"3433":247,"3434":7,"3435":1,"3436":1,"3437":0,"3438":0,"3439":0,"3440":48,"3441":19,"3442":83,"3443":0,"3444":1,"3445":0,"3446":0,"3447":0,"3448":6,"3449":0,"3450":0,"3451":0,"3452":7,"3453":0,"3454":0,"3455":0,"3456":32,"3457":64,"3458":6,"3459":1,"3460":1,"3461":0,"3462":0,"3463":0,"3464":208,"3465":246,"3466":7,"3467":1,"3468":1,"3469":0,"3470":0,"3471":0,"3472":0,"3473":0,"3474":0,"3475":0,"3476":254,"3477":22,"3478":0,"3479":0,"3480":48,"3481":253,"3482":82,"3483":0,"3484":1,"3485":0,"3486":0,"3487":0,"3488":8,"3489":0,"3490":0,"3491":0,"3492":9,"3493":0,"3494":0,"3495":0,"3496":55,"3497":0,"3498":0,"3499":0,"3500":1,"3501":0,"3502":0,"3503":0,"3504":112,"3505":247,"3506":7,"3507":1,"3508":1,"3509":0,"3510":0,"3511":0,"3512":247,"3513":22,"3514":0,"3515":0,"3516":1,"3517":0,"3518":0,"3519":0,"3520":208,"3521":247,"3522":7,"3523":1,"3524":1,"3525":0,"3526":0,"3527":0,"3528":4,"3529":0,"3530":0,"3531":0,"3532":3,"3533":0,"3534":0,"3535":0,"3536":128,"3537":248,"3538":7,"3539":1,"3540":1,"3541":0,"3542":0,"3543":0,"3544":0,"3545":250,"3546":7,"3547":1,"3548":1,"3549":0,"3550":0,"3551":0,"3552":144,"3553":253,"3554":7,"3555":1,"3556":1,"3557":0,"3558":0,"3559":0,"3560":168,"3561":247,"3562":7,"3563":1,"3564":1,"3565":0,"3566":0,"3567":0,"3568":48,"3569":17,"3570":83,"3571":0,"3572":1,"3573":0,"3574":0,"3575":0,"3576":10,"3577":0,"3578":0,"3579":0,"3580":11,"3581":0,"3582":0,"3583":0,"3584":40,"3585":64,"3586":6,"3587":1,"3588":1,"3589":0,"3590":0,"3591":0,"3592":24,"3593":248,"3594":7,"3595":1,"3596":1,"3597":0,"3598":0,"3599":0,"3600":5,"3601":0,"3602":0,"3603":0,"3604":1,"3605":0,"3606":0,"3607":0,"3608":104,"3609":248,"3610":7,"3611":1,"3612":1,"3613":0,"3614":0,"3615":0,"3616":8,"3617":63,"3618":6,"3619":1,"3620":1,"3621":0,"3622":0,"3623":0,"3624":48,"3625":17,"3626":83,"3627":0,"3628":1,"3629":0,"3630":0,"3631":0,"3632":10,"3633":0,"3634":0,"3635":0,"3636":11,"3637":0,"3638":0,"3639":0,"3640":48,"3641":64,"3642":6,"3643":1,"3644":1,"3645":0,"3646":0,"3647":0,"3648":48,"3649":19,"3650":83,"3651":0,"3652":1,"3653":0,"3654":0,"3655":0,"3656":12,"3657":0,"3658":0,"3659":0,"3660":13,"3661":0,"3662":0,"3663":0,"3664":48,"3665":64,"3666":6,"3667":1,"3668":1,"3669":0,"3670":0,"3671":0,"3672":208,"3673":246,"3674":7,"3675":1,"3676":1,"3677":0,"3678":0,"3679":0,"3680":0,"3681":0,"3682":0,"3683":1,"3684":29,"3685":23,"3686":0,"3687":0,"3688":80,"3689":42,"3690":83,"3691":0,"3692":1,"3693":0,"3694":0,"3695":0,"3696":22,"3697":23,"3698":0,"3699":0,"3700":1,"3701":0,"3702":0,"3703":0,"3704":64,"3705":248,"3706":7,"3707":1,"3708":1,"3709":0,"3710":0,"3711":0,"3712":240,"3713":247,"3714":7,"3715":1,"3716":1,"3717":0,"3718":0,"3719":0,"3720":132,"3721":255,"3722":255,"3723":255,"3724":0,"3725":0,"3726":0,"3727":0,"3728":8,"3729":248,"3730":7,"3731":1,"3732":1,"3733":0,"3734":0,"3735":0,"3736":20,"3737":23,"3738":0,"3739":0,"3740":0,"3741":0,"3742":0,"3743":0,"3744":14,"3745":0,"3746":0,"3747":0,"3748":15,"3749":0,"3750":0,"3751":0,"3752":48,"3753":17,"3754":83,"3755":0,"3756":1,"3757":0,"3758":0,"3759":0,"3760":16,"3761":0,"3762":0,"3763":0,"3764":17,"3765":0,"3766":0,"3767":0,"3768":56,"3769":64,"3770":6,"3771":1,"3772":1,"3773":0,"3774":0,"3775":0,"3776":208,"3777":248,"3778":7,"3779":1,"3780":1,"3781":0,"3782":0,"3783":0,"3784":5,"3785":0,"3786":0,"3787":0,"3788":1,"3789":0,"3790":0,"3791":0,"3792":232,"3793":249,"3794":7,"3795":1,"3796":1,"3797":0,"3798":0,"3799":0,"3800":14,"3801":0,"3802":0,"3803":0,"3804":15,"3805":0,"3806":0,"3807":0,"3808":48,"3809":17,"3810":83,"3811":0,"3812":1,"3813":0,"3814":0,"3815":0,"3816":16,"3817":0,"3818":0,"3819":0,"3820":17,"3821":0,"3822":0,"3823":0,"3824":64,"3825":64,"3826":6,"3827":1,"3828":1,"3829":0,"3830":0,"3831":0,"3832":48,"3833":19,"3834":83,"3835":0,"3836":1,"3837":0,"3838":0,"3839":0,"3840":18,"3841":0,"3842":0,"3843":0,"3844":19,"3845":0,"3846":0,"3847":0,"3848":64,"3849":64,"3850":6,"3851":1,"3852":1,"3853":0,"3854":0,"3855":0,"3856":40,"3857":60,"3858":184,"3859":0,"3860":1,"3861":0,"3862":0,"3863":0,"3864":0,"3865":0,"3866":0,"3867":1,"3868":58,"3869":23,"3870":0,"3871":0,"3872":48,"3873":249,"3874":7,"3875":1,"3876":1,"3877":0,"3878":0,"3879":0,"3880":4,"3881":0,"3882":0,"3883":0,"3884":2,"3885":0,"3886":0,"3887":0,"3888":80,"3889":249,"3890":7,"3891":1,"3892":1,"3893":0,"3894":0,"3895":0,"3896":120,"3897":249,"3898":7,"3899":1,"3900":1,"3901":0,"3902":0,"3903":0,"3904":72,"3905":64,"3906":6,"3907":1,"3908":1,"3909":0,"3910":0,"3911":0,"3912":88,"3913":62,"3914":184,"3915":0,"3916":1,"3917":0,"3918":0,"3919":0,"3920":48,"3921":19,"3922":83,"3923":0,"3924":1,"3925":0,"3926":0,"3927":0,"3928":20,"3929":0,"3930":0,"3931":0,"3932":21,"3933":0,"3934":0,"3935":0,"3936":72,"3937":64,"3938":6,"3939":1,"3940":1,"3941":0,"3942":0,"3943":0,"3944":208,"3945":246,"3946":7,"3947":1,"3948":1,"3949":0,"3950":0,"3951":0,"3952":0,"3953":0,"3954":0,"3955":1,"3956":67,"3957":23,"3958":0,"3959":0,"3960":48,"3961":17,"3962":83,"3963":0,"3964":1,"3965":0,"3966":0,"3967":0,"3968":22,"3969":0,"3970":0,"3971":0,"3972":23,"3973":0,"3974":0,"3975":0,"3976":80,"3977":64,"3978":6,"3979":1,"3980":1,"3981":0,"3982":0,"3983":0,"3984":48,"3985":3,"3986":83,"3987":0,"3988":1,"3989":0,"3990":0,"3991":0,"3992":24,"3993":0,"3994":0,"3995":0,"3996":25,"3997":0,"3998":0,"3999":0,"4000":248,"4001":248,"4002":7,"4003":1,"4004":1,"4005":0,"4006":0,"4007":0,"4008":32,"4009":249,"4010":7,"4011":1,"4012":1,"4013":0,"4014":0,"4015":0,"4016":58,"4017":23,"4018":0,"4019":0,"4020":0,"4021":0,"4022":0,"4023":0,"4024":0,"4025":0,"4026":0,"4027":0,"4028":23,"4029":0,"4030":0,"4031":0,"4032":1,"4033":0,"4034":0,"4035":0,"4036":0,"4037":0,"4038":0,"4039":0,"4040":0,"4041":0,"4042":0,"4043":0,"4044":0,"4045":0,"4046":0,"4047":0,"4048":72,"4049":84,"4050":84,"4051":80,"4052":47,"4053":49,"4054":46,"4055":49,"4056":0,"4057":0,"4058":0,"4059":0,"4060":0,"4061":0,"4062":0,"4063":0,"4064":26,"4065":0,"4066":0,"4067":0,"4068":1,"4069":0,"4070":0,"4071":0,"4072":80,"4073":42,"4074":83,"4075":0,"4076":1,"4077":0,"4078":0,"4079":0,"4080":51,"4081":23,"4082":0,"4083":0,"4084":1,"4085":0,"4086":0,"4087":0,"4088":144,"4089":249,"4090":7,"4091":1,"4092":1,"4093":0,"4094":0,"4095":0,"4096":168,"4097":248,"4098":7,"4099":1,"4100":1,"4101":0,"4102":0,"4103":0,"4104":115,"4105":255,"4106":255,"4107":255,"4108":0,"4109":0,"4110":0,"4111":0,"4112":192,"4113":248,"4114":7,"4115":1,"4116":1,"4117":0,"4118":0,"4119":0,"4120":49,"4121":23,"4122":0,"4123":0,"4124":0,"4125":0,"4126":0,"4127":0,"4128":27,"4129":0,"4130":0,"4131":0,"4132":28,"4133":0,"4134":0,"4135":0,"4136":56,"4137":250,"4138":7,"4139":1,"4140":1,"4141":0,"4142":0,"4143":0,"4144":5,"4145":0,"4146":0,"4147":0,"4148":1,"4149":0,"4150":0,"4151":0,"4152":88,"4153":253,"4154":7,"4155":1,"4156":1,"4157":0,"4158":0,"4159":0,"4160":0,"4161":0,"4162":0,"4163":0,"4164":0,"4165":0,"4166":0,"4167":0,"4168":248,"4169":248,"4170":7,"4171":1,"4172":1,"4173":0,"4174":0,"4175":0,"4176":49,"4177":23,"4178":0,"4179":0,"4180":0,"4181":0,"4182":0,"4183":0,"4184":27,"4185":0,"4186":0,"4187":0,"4188":28,"4189":0,"4190":0,"4191":0,"4192":48,"4193":19,"4194":83,"4195":0,"4196":1,"4197":0,"4198":0,"4199":0,"4200":29,"4201":0,"4202":0,"4203":0,"4204":30,"4205":0,"4206":0,"4207":0,"4208":88,"4209":64,"4210":6,"4211":1,"4212":1,"4213":0,"4214":0,"4215":0,"4216":0,"4217":247,"4218":7,"4219":1,"4220":1,"4221":0,"4222":0,"4223":0,"4224":0,"4225":0,"4226":0,"4227":1,"4228":97,"4229":23,"4230":0,"4231":0,"4232":16,"4233":52,"4234":83,"4235":0,"4236":1,"4237":0,"4238":0,"4239":0,"4240":255,"4241":255,"4242":255,"4243":255,"4244":1,"4245":0,"4246":0,"4247":0,"4248":0,"4249":0,"4250":0,"4251":0,"4252":0,"4253":0,"4254":0,"4255":0,"4256":1,"4257":0,"4258":0,"4259":0,"4260":0,"4261":0,"4262":0,"4263":0,"4264":0,"4265":0,"4266":0,"4267":0,"4268":31,"4269":0,"4270":0,"4271":0,"4272":32,"4273":0,"4274":0,"4275":0,"4276":1,"4277":0,"4278":0,"4279":0,"4280":216,"4281":250,"4282":7,"4283":1,"4284":1,"4285":0,"4286":0,"4287":0,"4288":16,"4289":0,"4290":0,"4291":0,"4292":1,"4293":0,"4294":0,"4295":0,"4296":0,"4297":255,"4298":255,"4299":255,"4300":1,"4301":0,"4302":0,"4303":0,"4304":0,"4305":0,"4306":0,"4307":0,"4308":0,"4309":0,"4310":0,"4311":0,"4312":48,"4313":252,"4314":7,"4315":1,"4316":1,"4317":0,"4318":0,"4319":0,"4320":0,"4321":0,"4322":0,"4323":0,"4324":31,"4325":0,"4326":0,"4327":0,"4328":32,"4329":0,"4330":0,"4331":0,"4332":1,"4333":0,"4334":0,"4335":0,"4336":16,"4337":251,"4338":7,"4339":1,"4340":1,"4341":0,"4342":0,"4343":0,"4344":16,"4345":0,"4346":0,"4347":0,"4348":1,"4349":0,"4350":0,"4351":0,"4352":0,"4353":0,"4354":0,"4355":1,"4356":196,"4357":25,"4358":0,"4359":0,"4360":0,"4361":0,"4362":0,"4363":0,"4364":0,"4365":0,"4366":0,"4367":0,"4368":104,"4369":252,"4370":7,"4371":1,"4372":1,"4373":0,"4374":0,"4375":0,"4376":10,"4377":0,"4378":0,"4379":0,"4380":11,"4381":0,"4382":0,"4383":0,"4384":32,"4385":63,"4386":6,"4387":1,"4388":1,"4389":0,"4390":0,"4391":0,"4392":8,"4393":250,"4394":7,"4395":1,"4396":1,"4397":0,"4398":0,"4399":0,"4400":0,"4401":0,"4402":0,"4403":1,"4404":216,"4405":25,"4406":0,"4407":0,"4408":48,"4409":3,"4410":83,"4411":0,"4412":1,"4413":0,"4414":0,"4415":0,"4416":12,"4417":0,"4418":0,"4419":0,"4420":13,"4421":0,"4422":0,"4423":0,"4424":168,"4425":250,"4426":7,"4427":1,"4428":1,"4429":0,"4430":0,"4431":0,"4432":224,"4433":250,"4434":7,"4435":1,"4436":1,"4437":0,"4438":0,"4439":0,"4440":48,"4441":19,"4442":83,"4443":0,"4444":1,"4445":0,"4446":0,"4447":0,"4448":33,"4449":0,"4450":0,"4451":0,"4452":34,"4453":0,"4454":0,"4455":0,"4456":96,"4457":64,"4458":6,"4459":1,"4460":1,"4461":0,"4462":0,"4463":0,"4464":24,"4465":254,"4466":7,"4467":1,"4468":1,"4469":0,"4470":0,"4471":0,"4472":0,"4473":0,"4474":0,"4475":0,"4476":119,"4477":23,"4478":0,"4479":0,"4480":144,"4481":251,"4482":7,"4483":1,"4484":1,"4485":0,"4486":0,"4487":0,"4488":4,"4489":0,"4490":0,"4491":0,"4492":1,"4493":0,"4494":0,"4495":0,"4496":176,"4497":251,"4498":7,"4499":1,"4500":1,"4501":0,"4502":0,"4503":0,"4504":33,"4505":0,"4506":0,"4507":0,"4508":34,"4509":0,"4510":0,"4511":0,"4512":104,"4513":64,"4514":6,"4515":1,"4516":1,"4517":0,"4518":0,"4519":0,"4520":80,"4521":254,"4522":7,"4523":1,"4524":1,"4525":0,"4526":0,"4527":0,"4528":48,"4529":19,"4530":83,"4531":0,"4532":1,"4533":0,"4534":0,"4535":0,"4536":35,"4537":0,"4538":0,"4539":0,"4540":36,"4541":0,"4542":0,"4543":0,"4544":104,"4545":64,"4546":6,"4547":1,"4548":1,"4549":0,"4550":0,"4551":0,"4552":0,"4553":247,"4554":7,"4555":1,"4556":1,"4557":0,"4558":0,"4559":0,"4560":0,"4561":0,"4562":0,"4563":0,"4564":127,"4565":23,"4566":0,"4567":0,"4568":48,"4569":3,"4570":83,"4571":0,"4572":1,"4573":0,"4574":0,"4575":0,"4576":37,"4577":0,"4578":0,"4579":0,"4580":38,"4581":0,"4582":0,"4583":0,"4584":88,"4585":251,"4586":7,"4587":1,"4588":1,"4589":0,"4590":0,"4591":0,"4592":128,"4593":251,"4594":7,"4595":1,"4596":1,"4597":0,"4598":0,"4599":0,"4600":119,"4601":23,"4602":0,"4603":0,"4604":0,"4605":0,"4606":0,"4607":0,"4608":0,"4609":0,"4610":0,"4611":0,"4612":1,"4613":0,"4614":0,"4615":0,"4616":1,"4617":0,"4618":0,"4619":0,"4620":0,"4621":0,"4622":0,"4623":0,"4624":0,"4625":0,"4626":0,"4627":0,"4628":0,"4629":0,"4630":0,"4631":0,"4632":0,"4633":0,"4634":0,"4635":0,"4636":0,"4637":0,"4638":0,"4639":0,"4640":0,"4641":0,"4642":0,"4643":0,"4644":0,"4645":0,"4646":0,"4647":0,"4648":39,"4649":0,"4650":0,"4651":0,"4652":1,"4653":0,"4654":0,"4655":0,"4656":80,"4657":42,"4658":83,"4659":0,"4660":1,"4661":0,"4662":0,"4663":0,"4664":112,"4665":23,"4666":0,"4667":0,"4668":1,"4669":0,"4670":0,"4671":0,"4672":216,"4673":251,"4674":7,"4675":1,"4676":1,"4677":0,"4678":0,"4679":0,"4680":16,"4681":52,"4682":83,"4683":0,"4684":1,"4685":0,"4686":0,"4687":0,"4688":255,"4689":255,"4690":255,"4691":255,"4692":0,"4693":0,"4694":0,"4695":0,"4696":0,"4697":0,"4698":0,"4699":0,"4700":0,"4701":0,"4702":0,"4703":0,"4704":1,"4705":0,"4706":0,"4707":0,"4708":0,"4709":0,"4710":0,"4711":0,"4712":0,"4713":0,"4714":0,"4715":0,"4716":40,"4717":0,"4718":0,"4719":0,"4720":41,"4721":0,"4722":0,"4723":0,"4724":1,"4725":0,"4726":0,"4727":0,"4728":152,"4729":252,"4730":7,"4731":1,"4732":1,"4733":0,"4734":0,"4735":0,"4736":16,"4737":0,"4738":0,"4739":0,"4740":1,"4741":0,"4742":0,"4743":0,"4744":0,"4745":255,"4746":255,"4747":255,"4748":19,"4749":0,"4750":0,"4751":0,"4752":0,"4753":0,"4754":0,"4755":0,"4756":0,"4757":0,"4758":0,"4759":0,"4760":64,"4761":253,"4762":7,"4763":1,"4764":1,"4765":0,"4766":0,"4767":0,"4768":0,"4769":0,"4770":0,"4771":0,"4772":40,"4773":0,"4774":0,"4775":0,"4776":41,"4777":0,"4778":0,"4779":0,"4780":1,"4781":0,"4782":0,"4783":0,"4784":208,"4785":252,"4786":7,"4787":1,"4788":1,"4789":0,"4790":0,"4791":0,"4792":16,"4793":0,"4794":0,"4795":0,"4796":1,"4797":0,"4798":0,"4799":0,"4800":0,"4801":0,"4802":0,"4803":0,"4804":0,"4805":0,"4806":0,"4807":0,"4808":0,"4809":0,"4810":0,"4811":0,"4812":0,"4813":0,"4814":0,"4815":0,"4816":120,"4817":253,"4818":7,"4819":1,"4820":1,"4821":0,"4822":0,"4823":0,"4824":232,"4825":252,"4826":7,"4827":1,"4828":1,"4829":0,"4830":0,"4831":0,"4832":4,"4833":0,"4834":0,"4835":0,"4836":2,"4837":0,"4838":0,"4839":0,"4840":48,"4841":11,"4842":83,"4843":0,"4844":1,"4845":0,"4846":0,"4847":0,"4848":19,"4849":0,"4850":0,"4851":0,"4852":20,"4853":0,"4854":0,"4855":0,"4856":1,"4857":0,"4858":0,"4859":0,"4860":1,"4861":0,"4862":0,"4863":0,"4864":1,"4865":0,"4866":0,"4867":0,"4868":243,"4869":0,"4870":0,"4871":0,"4872":48,"4873":63,"4874":6,"4875":1,"4876":1,"4877":0,"4878":0,"4879":0,"4880":184,"4881":252,"4882":7,"4883":1,"4884":1,"4885":0,"4886":0,"4887":0,"4888":48,"4889":19,"4890":83,"4891":0,"4892":1,"4893":0,"4894":0,"4895":0,"4896":42,"4897":0,"4898":0,"4899":0,"4900":43,"4901":0,"4902":0,"4903":0,"4904":112,"4905":64,"4906":6,"4907":1,"4908":1,"4909":0,"4910":0,"4911":0,"4912":88,"4913":60,"4914":184,"4915":0,"4916":1,"4917":0,"4918":0,"4919":0,"4920":0,"4921":0,"4922":0,"4923":0,"4924":163,"4925":23,"4926":0,"4927":0,"4928":80,"4929":42,"4930":83,"4931":0,"4932":1,"4933":0,"4934":0,"4935":0,"4936":156,"4937":23,"4938":0,"4939":0,"4940":1,"4941":0,"4942":0,"4943":0,"4944":24,"4945":253,"4946":7,"4947":1,"4948":1,"4949":0,"4950":0,"4951":0,"4952":48,"4953":47,"4954":83,"4955":0,"4956":1,"4957":0,"4958":0,"4959":0,"4960":93,"4961":23,"4962":0,"4963":0,"4964":1,"4965":0,"4966":0,"4967":0,"4968":96,"4969":250,"4970":7,"4971":1,"4972":1,"4973":0,"4974":0,"4975":0,"4976":136,"4977":250,"4978":7,"4979":1,"4980":1,"4981":0,"4982":0,"4983":0,"4984":72,"4985":252,"4986":7,"4987":1,"4988":1,"4989":0,"4990":0,"4991":0,"4992":44,"4993":0,"4994":0,"4995":0,"4996":45,"4997":0,"4998":0,"4999":0,"5000":46,"5001":0,"5002":0,"5003":0,"5004":1,"5005":0,"5006":0,"5007":0,"5008":0,"5009":0,"5010":0,"5011":0,"5012":0,"5013":0,"5014":0,"5015":0,"5016":79,"5017":255,"5018":255,"5019":255,"5020":0,"5021":0,"5022":0,"5023":0,"5024":40,"5025":250,"5026":7,"5027":1,"5028":1,"5029":0,"5030":0,"5031":0,"5032":85,"5033":23,"5034":0,"5035":0,"5036":0,"5037":0,"5038":0,"5039":0,"5040":47,"5041":0,"5042":0,"5043":0,"5044":48,"5045":0,"5046":0,"5047":0,"5048":48,"5049":25,"5050":83,"5051":0,"5052":1,"5053":0,"5054":0,"5055":0,"5056":116,"5057":1,"5058":0,"5059":0,"5060":117,"5061":1,"5062":0,"5063":0,"5064":8,"5065":64,"5066":6,"5067":1,"5068":1,"5069":0,"5070":0,"5071":0,"5072":128,"5073":243,"5074":7,"5075":1,"5076":1,"5077":0,"5078":0,"5079":0,"5080":128,"5081":246,"5082":7,"5083":1,"5084":1,"5085":0,"5086":0,"5087":0,"5088":0,"5089":0,"5090":0,"5091":0,"5092":0,"5093":0,"5094":0,"5095":0,"5096":0,"5097":0,"5098":0,"5099":0,"5100":48,"5101":0,"5102":0,"5103":0,"5104":80,"5105":107,"5106":2,"5107":1,"5108":1,"5109":0,"5110":0,"5111":0,"5112":2,"5113":0,"5114":0,"5115":0,"5116":226,"5117":22,"5118":0,"5119":0,"5120":187,"5121":23,"5122":0,"5123":0,"5124":210,"5125":22,"5126":0,"5127":0,"5128":120,"5129":64,"5130":6,"5131":1,"5132":1,"5133":0,"5134":0,"5135":0,"5136":0,"5137":0,"5138":0,"5139":0,"5140":1,"5141":0,"5142":0,"5143":0,"5144":176,"5145":235,"5146":6,"5147":1,"5148":1,"5149":0,"5150":0,"5151":0,"5152":8,"5153":64,"5154":6,"5155":1,"5156":1,"5157":0,"5158":0,"5159":0,"5160":0,"5161":0,"5162":0,"5163":0,"5164":0,"5165":0,"5166":0,"5167":0,"5168":3,"5169":0,"5170":0,"5171":0,"5172":21,"5173":0,"5174":0,"5175":0,"5176":0,"5177":0,"5178":0,"5179":0,"5180":0,"5181":0,"5182":0,"5183":0,"5184":1,"5185":1,"5186":1,"5187":1,"5188":1,"5189":0,"5190":0,"5191":0,"5192":48,"5193":19,"5194":83,"5195":0,"5196":1,"5197":0,"5198":0,"5199":0,"5200":118,"5201":1,"5202":0,"5203":0,"5204":119,"5205":1,"5206":0,"5207":0,"5208":8,"5209":64,"5210":6,"5211":1,"5212":1,"5213":0,"5214":0,"5215":0,"5216":24,"5217":254,"5218":7,"5219":1,"5220":1,"5221":0,"5222":0,"5223":0,"5224":0,"5225":0,"5226":0,"5227":0,"5228":186,"5229":23,"5230":0,"5231":0,"5232":176,"5233":53,"5234":83,"5235":0,"5236":1,"5237":0,"5238":0,"5239":0,"5240":72,"5241":254,"5242":7,"5243":1,"5244":1,"5245":0,"5246":0,"5247":0,"5248":0,"5249":0,"5250":0,"5251":0,"5252":1,"5253":0,"5254":0,"5255":0,"5256":184,"5257":253,"5258":7,"5259":1,"5260":1,"5261":0,"5262":0,"5263":0,"5264":176,"5265":235,"5266":6,"5267":1,"5268":1,"5269":0,"5270":0,"5271":0,"5272":88,"5273":242,"5274":6,"5275":1,"5276":1,"5277":0,"5278":0,"5279":0,"5280":136,"5281":244,"5282":6,"5283":1,"5284":1,"5285":0,"5286":0,"5287":0,"5288":184,"5289":246,"5290":6,"5291":1,"5292":1,"5293":0,"5294":0,"5295":0,"5296":56,"5297":249,"5298":6,"5299":1,"5300":1,"5301":0,"5302":0,"5303":0,"5304":184,"5305":251,"5306":6,"5307":1,"5308":1,"5309":0,"5310":0,"5311":0,"5312":128,"5313":0,"5314":7,"5315":1,"5316":1,"5317":0,"5318":0,"5319":0,"5320":200,"5321":3,"5322":7,"5323":1,"5324":1,"5325":0,"5326":0,"5327":0,"5328":72,"5329":6,"5330":7,"5331":1,"5332":1,"5333":0,"5334":0,"5335":0,"5336":32,"5337":8,"5338":7,"5339":1,"5340":1,"5341":0,"5342":0,"5343":0,"5344":40,"5345":223,"5346":7,"5347":1,"5348":1,"5349":0,"5350":0,"5351":0,"5352":176,"5353":229,"5354":7,"5355":1,"5356":1,"5357":0,"5358":0,"5359":0,"5360":112,"5361":254,"5362":7,"5363":1,"5364":1,"5365":0,"5366":0,"5367":0,"5368":80,"5369":238,"5370":120,"5371":0,"5372":1,"5373":0,"5374":0,"5375":0,"5376":88,"5377":99,"5378":180,"5379":0,"5380":1,"5381":0,"5382":0,"5383":0,"5384":208,"5385":165,"5386":180,"5387":0,"5388":1,"5389":0,"5390":0,"5391":0,"5392":56,"5393":188,"5394":180,"5395":0,"5396":1,"5397":0,"5398":0,"5399":0,"5400":0,"5401":253,"5402":180,"5403":0,"5404":1,"5405":0,"5406":0,"5407":0,"5408":48,"5409":19,"5410":83,"5411":0,"5412":1,"5413":0,"5414":0,"5415":0,"5416":120,"5417":1,"5418":0,"5419":0,"5420":121,"5421":1,"5422":0,"5423":0,"5424":128,"5425":64,"5426":6,"5427":1,"5428":1,"5429":0,"5430":0,"5431":0,"5432":96,"5433":251,"5434":6,"5435":1,"5436":1,"5437":0,"5438":0,"5439":0,"5440":0,"5441":0,"5442":0,"5443":0,"5444":189,"5445":23,"5446":0,"5447":0,"5448":48,"5449":17,"5450":83,"5451":0,"5452":1,"5453":0,"5454":0,"5455":0,"5456":122,"5457":1,"5458":0,"5459":0,"5460":123,"5461":1,"5462":0,"5463":0,"5464":136,"5465":64,"5466":6,"5467":1,"5468":1,"5469":0,"5470":0,"5471":0,"5472":48,"5473":5,"5474":83,"5475":0,"5476":1,"5477":0,"5478":0,"5479":0,"5480":124,"5481":1,"5482":0,"5483":0,"5484":125,"5485":1,"5486":0,"5487":0,"5488":32,"5489":255,"5490":7,"5491":1,"5492":1,"5493":0,"5494":0,"5495":0,"5496":72,"5497":255,"5498":7,"5499":1,"5500":1,"5501":0,"5502":0,"5503":0,"5504":191,"5505":23,"5506":0,"5507":0,"5508":1,"5509":0,"5510":0,"5511":0,"5512":1,"5513":0,"5514":0,"5515":0,"5516":0,"5517":0,"5518":0,"5519":0,"5520":128,"5521":64,"5522":6,"5523":1,"5524":1,"5525":0,"5526":0,"5527":0,"5528":0,"5529":104,"5530":2,"5531":1,"5532":1,"5533":0,"5534":0,"5535":0,"5536":176,"5537":235,"5538":6,"5539":1,"5540":1,"5541":0,"5542":0,"5543":0,"5544":120,"5545":0,"5546":8,"5547":1,"5548":1,"5549":0,"5550":0,"5551":0,"5552":4,"5553":0,"5554":0,"5555":0,"5556":0,"5557":0,"5558":0,"5559":0,"5560":1,"5561":0,"5562":0,"5563":0,"5564":46,"5565":0,"5566":0,"5567":0,"5568":8,"5569":110,"5570":2,"5571":1,"5572":1,"5573":0,"5574":0,"5575":0,"5576":80,"5577":79,"5578":84,"5579":0,"5580":1,"5581":0,"5582":0,"5583":0,"5584":72,"5585":123,"5586":85,"5587":0,"5588":1,"5589":0,"5590":0,"5591":0,"5592":240,"5593":38,"5594":36,"5595":0,"5596":1,"5597":0,"5598":0,"5599":0,"5600":152,"5601":0,"5602":8,"5603":1,"5604":1,"5605":0,"5606":0,"5607":0,"5608":8,"5609":0,"5610":0,"5611":0,"5612":6,"5613":0,"5614":0,"5615":0,"5616":88,"5617":1,"5618":8,"5619":1,"5620":1,"5621":0,"5622":0,"5623":0,"5624":4,"5625":0,"5626":0,"5627":0,"5628":0,"5629":0,"5630":0,"5631":0,"5632":120,"5633":1,"5634":8,"5635":1,"5636":1,"5637":0,"5638":0,"5639":0,"5640":4,"5641":0,"5642":0,"5643":0,"5644":4,"5645":0,"5646":0,"5647":0,"5648":0,"5649":0,"5650":0,"5651":0,"5652":0,"5653":0,"5654":0,"5655":0,"5656":152,"5657":1,"5658":8,"5659":1,"5660":1,"5661":0,"5662":0,"5663":0,"5664":16,"5665":0,"5666":0,"5667":0,"5668":16,"5669":0,"5670":0,"5671":0,"5672":24,"5673":2,"5674":8,"5675":1,"5676":1,"5677":0,"5678":0,"5679":0,"5680":4,"5681":0,"5682":0,"5683":0,"5684":0,"5685":0,"5686":0,"5687":0,"5688":56,"5689":2,"5690":8,"5691":1,"5692":1,"5693":0,"5694":0,"5695":0,"5696":0,"5697":0,"5698":0,"5699":0,"5700":0,"5701":0,"5702":0,"5703":0,"5704":104,"5705":2,"5706":8,"5707":1,"5708":1,"5709":0,"5710":0,"5711":0,"5712":0,"5713":0,"5714":0,"5715":0,"5716":0,"5717":0,"5718":0,"5719":0,"5720":0,"5721":0,"5722":0,"5723":0,"5724":0,"5725":0,"5726":0,"5727":0,"5728":0,"5729":0,"5730":8,"5731":1,"5732":0,"5733":0,"5734":0,"5735":0,"5736":1,"5737":0,"5738":0,"5739":0,"5740":8,"5741":0,"5742":0,"5743":0,"5744":0,"5745":0,"5746":0,"5747":0,"5748":0,"5749":0,"5750":0,"5751":0,"5752":0,"5753":0,"5754":0,"5755":0,"5756":0,"5757":0,"5758":0,"5759":0,"5760":160,"5761":2,"5762":8,"5763":1,"5764":1,"5765":0,"5766":0,"5767":0,"5768":0,"5769":0,"5770":0,"5771":0,"5772":0,"5773":0,"5774":0,"5775":0,"5776":0,"5777":0,"5778":0,"5779":0,"5780":0,"5781":0,"5782":0,"5783":0,"5784":192,"5785":110,"5786":2,"5787":1,"5788":1,"5789":0,"5790":0,"5791":0,"5792":56,"5793":2,"5794":8,"5795":1,"5796":1,"5797":0,"5798":0,"5799":0,"5800":240,"5801":164,"5802":19,"5803":25,"5804":0,"5805":0,"5806":0,"5807":0,"5808":152,"5809":64,"5810":6,"5811":1,"5812":1,"5813":0,"5814":0,"5815":0,"5816":24,"5817":3,"5818":8,"5819":1,"5820":1,"5821":0,"5822":0,"5823":0,"5824":120,"5825":199,"5826":251,"5827":58,"5828":51,"5829":0,"5830":0,"5831":0,"5832":160,"5833":64,"5834":6,"5835":1,"5836":1,"5837":0,"5838":0,"5839":0,"5840":72,"5841":3,"5842":8,"5843":1,"5844":1,"5845":0,"5846":0,"5847":0,"5848":65,"5849":41,"5850":125,"5851":46,"5852":1,"5853":0,"5854":0,"5855":0,"5856":168,"5857":109,"5858":2,"5859":1,"5860":1,"5861":0,"5862":0,"5863":0,"5864":104,"5865":2,"5866":8,"5867":1,"5868":1,"5869":0,"5870":0,"5871":0,"5872":139,"5873":60,"5874":40,"5875":15,"5876":1,"5877":0,"5878":0,"5879":0,"5880":0,"5881":0,"5882":0,"5883":0,"5884":0,"5885":0,"5886":0,"5887":0,"5888":168,"5889":64,"5890":6,"5891":1,"5892":1,"5893":0,"5894":0,"5895":0,"5896":128,"5897":3,"5898":8,"5899":1,"5900":1,"5901":0,"5902":0,"5903":0,"5904":144,"5905":64,"5906":6,"5907":1,"5908":1,"5909":0,"5910":0,"5911":0,"5912":232,"5913":2,"5914":8,"5915":1,"5916":1,"5917":0,"5918":0,"5919":0,"5920":165,"5921":120,"5922":54,"5923":30,"5924":1,"5925":0,"5926":0,"5927":0,"5928":168,"5929":64,"5930":6,"5931":1,"5932":1,"5933":0,"5934":0,"5935":0,"5936":120,"5937":3,"5938":8,"5939":1,"5940":1,"5941":0,"5942":0,"5943":0,"5944":213,"5945":254,"5946":139,"5947":8,"5948":1,"5949":0,"5950":0,"5951":0,"5952":0,"5953":0,"5954":0,"5955":0,"5956":0,"5957":0,"5958":0,"5959":0,"5960":152,"5961":64,"5962":6,"5963":1,"5964":1,"5965":0,"5966":0,"5967":0,"5968":32,"5969":3,"5970":8,"5971":1,"5972":1,"5973":0,"5974":0,"5975":0,"5976":165,"5977":120,"5978":54,"5979":30,"5980":59,"5981":0,"5982":0,"5983":0,"5984":176,"5985":64,"5986":6,"5987":1,"5988":1,"5989":0,"5990":0,"5991":0,"5992":176,"5993":3,"5994":8,"5995":1,"5996":1,"5997":0,"5998":0,"5999":0,"6000":213,"6001":254,"6002":139,"6003":8,"6004":1,"6005":0,"6006":0,"6007":0,"6008":232,"6009":2,"6010":8,"6011":1,"6012":1,"6013":0,"6014":0,"6015":0,"6016":24,"6017":3,"6018":8,"6019":1,"6020":1,"6021":0,"6022":0,"6023":0,"6024":72,"6025":3,"6026":8,"6027":1,"6028":1,"6029":0,"6030":0,"6031":0,"6032":120,"6033":3,"6034":8,"6035":1,"6036":1,"6037":0,"6038":0,"6039":0,"6040":168,"6041":3,"6042":8,"6043":1,"6044":1,"6045":0,"6046":0,"6047":0,"6048":208,"6049":3,"6050":8,"6051":1,"6052":1,"6053":0,"6054":0,"6055":0,"6056":248,"6057":3,"6058":8,"6059":1,"6060":1,"6061":0,"6062":0,"6063":0,"6064":88,"6065":5,"6066":8,"6067":1,"6068":1,"6069":0,"6070":0,"6071":0,"6072":232,"6073":6,"6074":8,"6075":1,"6076":1,"6077":0,"6078":0,"6079":0,"6080":16,"6081":7,"6082":8,"6083":1,"6084":1,"6085":0,"6086":0,"6087":0,"6088":216,"6089":7,"6090":8,"6091":1,"6092":1,"6093":0,"6094":0,"6095":0,"6096":0,"6097":8,"6098":8,"6099":1,"6100":1,"6101":0,"6102":0,"6103":0,"6104":88,"6105":8,"6106":8,"6107":1,"6108":1,"6109":0,"6110":0,"6111":0,"6112":88,"6113":9,"6114":8,"6115":1,"6116":1,"6117":0,"6118":0,"6119":0,"6120":0,"6121":10,"6122":8,"6123":1,"6124":1,"6125":0,"6126":0,"6127":0,"6128":168,"6129":10,"6130":8,"6131":1,"6132":1,"6133":0,"6134":0,"6135":0,"6136":40,"6137":11,"6138":8,"6139":1,"6140":1,"6141":0,"6142":0,"6143":0,"6144":128,"6145":11,"6146":8,"6147":1,"6148":1,"6149":0,"6150":0,"6151":0,"6152":0,"6153":12,"6154":8,"6155":1,"6156":1,"6157":0,"6158":0,"6159":0,"6160":40,"6161":12,"6162":8,"6163":1,"6164":1,"6165":0,"6166":0,"6167":0,"6168":144,"6169":9,"6170":8,"6171":1,"6172":1,"6173":0,"6174":0,"6175":0,"6176":56,"6177":10,"6178":8,"6179":1,"6180":1,"6181":0,"6182":0,"6183":0,"6184":224,"6185":10,"6186":8,"6187":1,"6188":1,"6189":0,"6190":0,"6191":0,"6192":96,"6193":11,"6194":8,"6195":1,"6196":1,"6197":0,"6198":0,"6199":0,"6200":152,"6201":255,"6202":7,"6203":1,"6204":1,"6205":0,"6206":0,"6207":0,"6208":192,"6209":110,"6210":2,"6211":1,"6212":1,"6213":0,"6214":0,"6215":0,"6216":0,"6217":0,"6218":0,"6219":0,"6220":1,"6221":0,"6222":0,"6223":0,"6224":1,"6225":0,"6226":0,"6227":0,"6228":255,"6229":255,"6230":255,"6231":255,"6232":0,"6233":0,"6234":0,"6235":0,"6236":0,"6237":0,"6238":0,"6239":0,"6240":0,"6241":0,"6242":0,"6243":0,"6244":0,"6245":0,"6246":0,"6247":0,"6248":152,"6249":255,"6250":7,"6251":1,"6252":1,"6253":0,"6254":0,"6255":0,"6256":168,"6257":109,"6258":2,"6259":1,"6260":1,"6261":0,"6262":0,"6263":0,"6264":0,"6265":0,"6266":0,"6267":0,"6268":2,"6269":0,"6270":0,"6271":0,"6272":2,"6273":0,"6274":0,"6275":0,"6276":0,"6277":0,"6278":0,"6279":0,"6280":0,"6281":0,"6282":0,"6283":0,"6284":0,"6285":0,"6286":0,"6287":0,"6288":1,"6289":0,"6290":1,"6291":0,"6292":0,"6293":0,"6294":0,"6295":0,"6296":168,"6297":2,"6298":8,"6299":1,"6300":1,"6301":0,"6302":0,"6303":0,"6304":8,"6305":0,"6306":0,"6307":0,"6308":4,"6309":0,"6310":0,"6311":0,"6312":64,"6313":5,"6314":8,"6315":1,"6316":1,"6317":0,"6318":0,"6319":0,"6320":160,"6321":7,"6322":8,"6323":1,"6324":1,"6325":0,"6326":0,"6327":0,"6328":64,"6329":9,"6330":8,"6331":1,"6332":1,"6333":0,"6334":0,"6335":0,"6336":168,"6337":12,"6338":8,"6339":1,"6340":1,"6341":0,"6342":0,"6343":0,"6344":1,"6345":0,"6346":1,"6347":1,"6348":1,"6349":0,"6350":0,"6351":0,"6352":224,"6353":2,"6354":8,"6355":1,"6356":1,"6357":0,"6358":0,"6359":0,"6360":8,"6361":0,"6362":0,"6363":0,"6364":4,"6365":0,"6366":0,"6367":0,"6368":120,"6369":5,"6370":8,"6371":1,"6372":1,"6373":0,"6374":0,"6375":0,"6376":152,"6377":255,"6378":7,"6379":1,"6380":1,"6381":0,"6382":0,"6383":0,"6384":144,"6385":64,"6386":6,"6387":1,"6388":1,"6389":0,"6390":0,"6391":0,"6392":0,"6393":0,"6394":0,"6395":0,"6396":0,"6397":0,"6398":0,"6399":0,"6400":3,"6401":0,"6402":0,"6403":0,"6404":7,"6405":0,"6406":0,"6407":0,"6408":0,"6409":0,"6410":0,"6411":0,"6412":0,"6413":0,"6414":0,"6415":0,"6416":1,"6417":1,"6418":1,"6419":1,"6420":1,"6421":0,"6422":0,"6423":0,"6424":152,"6425":255,"6426":7,"6427":1,"6428":1,"6429":0,"6430":0,"6431":0,"6432":152,"6433":64,"6434":6,"6435":1,"6436":1,"6437":0,"6438":0,"6439":0,"6440":0,"6441":0,"6442":0,"6443":0,"6444":0,"6445":0,"6446":0,"6447":0,"6448":3,"6449":0,"6450":0,"6451":0,"6452":6,"6453":0,"6454":0,"6455":0,"6456":0,"6457":0,"6458":0,"6459":0,"6460":0,"6461":0,"6462":0,"6463":0,"6464":1,"6465":1,"6466":1,"6467":0,"6468":0,"6469":0,"6470":0,"6471":0,"6472":152,"6473":255,"6474":7,"6475":1,"6476":1,"6477":0,"6478":0,"6479":0,"6480":160,"6481":64,"6482":6,"6483":1,"6484":1,"6485":0,"6486":0,"6487":0,"6488":0,"6489":0,"6490":0,"6491":0,"6492":0,"6493":0,"6494":0,"6495":0,"6496":3,"6497":0,"6498":0,"6499":0,"6500":5,"6501":0,"6502":0,"6503":0,"6504":0,"6505":0,"6506":0,"6507":0,"6508":0,"6509":0,"6510":0,"6511":0,"6512":1,"6513":1,"6514":1,"6515":0,"6516":0,"6517":0,"6518":0,"6519":0,"6520":152,"6521":255,"6522":7,"6523":1,"6524":1,"6525":0,"6526":0,"6527":0,"6528":168,"6529":64,"6530":6,"6531":1,"6532":1,"6533":0,"6534":0,"6535":0,"6536":0,"6537":0,"6538":0,"6539":0,"6540":0,"6541":0,"6542":0,"6543":0,"6544":3,"6545":0,"6546":0,"6547":0,"6548":4,"6549":0,"6550":0,"6551":0,"6552":0,"6553":0,"6554":0,"6555":0,"6556":0,"6557":0,"6558":0,"6559":0,"6560":1,"6561":1,"6562":1,"6563":0,"6564":0,"6565":0,"6566":0,"6567":0,"6568":48,"6569":19,"6570":83,"6571":0,"6572":1,"6573":0,"6574":0,"6575":0,"6576":4,"6577":0,"6578":0,"6579":0,"6580":5,"6581":0,"6582":0,"6583":0,"6584":176,"6585":64,"6586":6,"6587":1,"6588":1,"6589":0,"6590":0,"6591":0,"6592":120,"6593":3,"6594":8,"6595":1,"6596":1,"6597":0,"6598":0,"6599":0,"6600":0,"6601":0,"6602":0,"6603":0,"6604":241,"6605":23,"6606":0,"6607":0,"6608":48,"6609":19,"6610":83,"6611":0,"6612":1,"6613":0,"6614":0,"6615":0,"6616":6,"6617":0,"6618":0,"6619":0,"6620":7,"6621":0,"6622":0,"6623":0,"6624":184,"6625":64,"6626":6,"6627":1,"6628":1,"6629":0,"6630":0,"6631":0,"6632":104,"6633":2,"6634":8,"6635":1,"6636":1,"6637":0,"6638":0,"6639":0,"6640":0,"6641":0,"6642":0,"6643":1,"6644":252,"6645":23,"6646":0,"6647":0,"6648":48,"6649":19,"6650":83,"6651":0,"6652":1,"6653":0,"6654":0,"6655":0,"6656":8,"6657":0,"6658":0,"6659":0,"6660":9,"6661":0,"6662":0,"6663":0,"6664":192,"6665":64,"6666":6,"6667":1,"6668":1,"6669":0,"6670":0,"6671":0,"6672":104,"6673":2,"6674":8,"6675":1,"6676":1,"6677":0,"6678":0,"6679":0,"6680":0,"6681":0,"6682":0,"6683":1,"6684":6,"6685":24,"6686":0,"6687":0,"6688":48,"6689":17,"6690":83,"6691":0,"6692":1,"6693":0,"6694":0,"6695":0,"6696":10,"6697":0,"6698":0,"6699":0,"6700":11,"6701":0,"6702":0,"6703":0,"6704":200,"6705":64,"6706":6,"6707":1,"6708":1,"6709":0,"6710":0,"6711":0,"6712":48,"6713":5,"6714":83,"6715":0,"6716":1,"6717":0,"6718":0,"6719":0,"6720":12,"6721":0,"6722":0,"6723":0,"6724":13,"6725":0,"6726":0,"6727":0,"6728":248,"6729":3,"6730":8,"6731":1,"6732":1,"6733":0,"6734":0,"6735":0,"6736":32,"6737":4,"6738":8,"6739":1,"6740":1,"6741":0,"6742":0,"6743":0,"6744":15,"6745":24,"6746":0,"6747":0,"6748":1,"6749":0,"6750":0,"6751":0,"6752":1,"6753":0,"6754":0,"6755":0,"6756":0,"6757":0,"6758":0,"6759":0,"6760":192,"6761":64,"6762":6,"6763":1,"6764":1,"6765":0,"6766":0,"6767":0,"6768":48,"6769":17,"6770":83,"6771":0,"6772":1,"6773":0,"6774":0,"6775":0,"6776":14,"6777":0,"6778":0,"6779":0,"6780":15,"6781":0,"6782":0,"6783":0,"6784":208,"6785":64,"6786":6,"6787":1,"6788":1,"6789":0,"6790":0,"6791":0,"6792":48,"6793":249,"6794":82,"6795":0,"6796":1,"6797":0,"6798":0,"6799":0,"6800":16,"6801":0,"6802":0,"6803":0,"6804":17,"6805":0,"6806":0,"6807":0,"6808":38,"6809":0,"6810":0,"6811":0,"6812":0,"6813":0,"6814":0,"6815":0,"6816":56,"6817":4,"6818":8,"6819":1,"6820":1,"6821":0,"6822":0,"6823":0,"6824":112,"6825":4,"6826":8,"6827":1,"6828":1,"6829":0,"6830":0,"6831":0,"6832":23,"6833":24,"6834":0,"6835":0,"6836":255,"6837":255,"6838":255,"6839":255,"6840":48,"6841":5,"6842":83,"6843":0,"6844":1,"6845":0,"6846":0,"6847":0,"6848":18,"6849":0,"6850":0,"6851":0,"6852":19,"6853":0,"6854":0,"6855":0,"6856":208,"6857":3,"6858":8,"6859":1,"6860":1,"6861":0,"6862":0,"6863":0,"6864":136,"6865":4,"6866":8,"6867":1,"6868":1,"6869":0,"6870":0,"6871":0,"6872":5,"6873":24,"6874":0,"6875":0,"6876":1,"6877":0,"6878":0,"6879":0,"6880":1,"6881":0,"6882":0,"6883":0,"6884":0,"6885":0,"6886":0,"6887":0,"6888":0,"6889":24,"6890":0,"6891":0,"6892":255,"6893":255,"6894":255,"6895":255,"6896":48,"6897":9,"6898":83,"6899":0,"6900":1,"6901":0,"6902":0,"6903":0,"6904":20,"6905":0,"6906":0,"6907":0,"6908":21,"6909":0,"6910":0,"6911":0,"6912":16,"6913":0,"6914":0,"6915":0,"6916":1,"6917":0,"6918":0,"6919":0,"6920":168,"6921":3,"6922":8,"6923":1,"6924":1,"6925":0,"6926":0,"6927":0,"6928":184,"6929":4,"6930":8,"6931":1,"6932":1,"6933":0,"6934":0,"6935":0,"6936":250,"6937":23,"6938":0,"6939":0,"6940":0,"6941":0,"6942":0,"6943":0,"6944":0,"6945":0,"6946":0,"6947":0,"6948":0,"6949":0,"6950":0,"6951":0,"6952":255,"6953":255,"6954":255,"6955":255,"6956":22,"6957":0,"6958":0,"6959":0,"6960":0,"6961":0,"6962":0,"6963":0,"6964":21,"6965":0,"6966":0,"6967":0,"6968":1,"6969":0,"6970":0,"6971":0,"6972":0,"6973":0,"6974":0,"6975":0,"6976":112,"6977":50,"6978":83,"6979":0,"6980":1,"6981":0,"6982":0,"6983":0,"6984":241,"6985":23,"6986":0,"6987":0,"6988":1,"6989":0,"6990":0,"6991":0,"6992":240,"6993":4,"6994":8,"6995":1,"6996":1,"6997":0,"6998":0,"6999":0,"7000":48,"7001":19,"7002":83,"7003":0,"7004":1,"7005":0,"7006":0,"7007":0,"7008":23,"7009":0,"7010":0,"7011":0,"7012":24,"7013":0,"7014":0,"7015":0,"7016":216,"7017":64,"7018":6,"7019":1,"7020":1,"7021":0,"7022":0,"7023":0,"7024":120,"7025":3,"7026":8,"7027":1,"7028":1,"7029":0,"7030":0,"7031":0,"7032":0,"7033":0,"7034":0,"7035":0,"7036":42,"7037":24,"7038":0,"7039":0,"7040":48,"7041":253,"7042":82,"7043":0,"7044":1,"7045":0,"7046":0,"7047":0,"7048":25,"7049":0,"7050":0,"7051":0,"7052":26,"7053":0,"7054":0,"7055":0,"7056":55,"7057":0,"7058":0,"7059":0,"7060":1,"7061":0,"7062":0,"7063":0,"7064":88,"7065":5,"7066":8,"7067":1,"7068":1,"7069":0,"7070":0,"7071":0,"7072":35,"7073":24,"7074":0,"7075":0,"7076":1,"7077":0,"7078":0,"7079":0,"7080":48,"7081":17,"7082":83,"7083":0,"7084":1,"7085":0,"7086":0,"7087":0,"7088":27,"7089":0,"7090":0,"7091":0,"7092":28,"7093":0,"7094":0,"7095":0,"7096":224,"7097":64,"7098":6,"7099":1,"7100":1,"7101":0,"7102":0,"7103":0,"7104":48,"7105":247,"7106":82,"7107":0,"7108":1,"7109":0,"7110":0,"7111":0,"7112":29,"7113":0,"7114":0,"7115":0,"7116":30,"7117":0,"7118":0,"7119":0,"7120":44,"7121":0,"7122":0,"7123":0,"7124":1,"7125":0,"7126":0,"7127":0,"7128":128,"7129":5,"7130":8,"7131":1,"7132":1,"7133":0,"7134":0,"7135":0,"7136":168,"7137":5,

pretty-printing a file with bunyan logs

I was trying without success to pretty-print a file with bunyan logs. The file has a log per line. This is useful when I reading *.sock files. So, How is the proper way to do this? If it's posible

Thanks in advance.

singals leave terminal state in a bad place

If bunyan takes a signal at an inopportune moment, say due to someone hitting ctrl+c on the command line, then you are left with the color state that it was interrupted in.

bunyan CLI `-o short` excludes 'src' info. I don't think it should

$ node bar.js | by
[2012-10-24T15:58:39.263Z] ERROR: foo/16095 on banana.local (/Users/trentm/tm/node-bunyan-0.x/bar.js:13): err from c
    TypeError: boom
        at c (/Users/trentm/tm/node-bunyan-0.x/bar.js:19:14)
        at b (/Users/trentm/tm/node-bunyan-0.x/bar.js:11:5)
        at a (/Users/trentm/tm/node-bunyan-0.x/bar.js:7:5)
        at Object.<anonymous> (/Users/trentm/tm/node-bunyan-0.x/bar.js:22:1)
        at Module._compile (module.js:449:26)
        at Object.Module._extensions..js (module.js:467:10)
        at Module.load (module.js:356:32)
        at Function.Module._load (module.js:312:12)
        at Module.runMain (module.js:492:10)
        at process.startup.processNextTick.process._tickCallback (node.js:244:9)

$ node bar.js | by -o short
15:58:48.414Z ERROR foo: err from c
    TypeError: boom
        at c (/Users/trentm/tm/node-bunyan-0.x/bar.js:19:14)
        at b (/Users/trentm/tm/node-bunyan-0.x/bar.js:11:5)
        at a (/Users/trentm/tm/node-bunyan-0.x/bar.js:7:5)
        at Object.<anonymous> (/Users/trentm/tm/node-bunyan-0.x/bar.js:22:1)
        at Module._compile (module.js:449:26)
        at Object.Module._extensions..js (module.js:467:10)
        at Module.load (module.js:356:32)
        at Function.Module._load (module.js:312:12)
        at Module.runMain (module.js:492:10)
        at process.startup.processNextTick.process._tickCallback (node.js:244:9)

Can't use 'path' for top-level stream

Something like:

bunyan.createLogger({name: 'MyName', path: 'log.txt'});

currently doesn't work. The following trivial patch fixes the issue:

diff --git a/lib/bunyan.js b/lib/bunyan.js
index 5d0abf7..abaf7dd 100644
--- a/lib/bunyan.js
+++ b/lib/bunyan.js
@@ -349,13 +349,8 @@ function Logger(options, _childOptions, _childSimple) {
   }

   // Handle *config* options.
-  if (options.stream) {
-    addStream({
-      type: 'stream',
-      stream: options.stream,
-      closeOnExit: false,
-      level: (options.level ? resolveLevel(options.level) : INFO)
-    });
+  if (options.stream || options.path) {
+    addStream(options);
   } else if (options.streams) {
     options.streams.forEach(addStream);
   } else if (!parent) {

bunyan -p $pid fails silently if no root priviledges

$ bunyan --version
bunyan 0.16.3
$  bunyan -l debug -p $(pgrep node)
$
$ sudo bunyan -l debug -p $(pgrep node)
[2012-11-02T21:17:40.936Z] DEBUG: restify/picker/94737 on martin: fetchRecords: entered (requestId=bc201d70-2532-11e2-8a07-1376905bebcf)

As we discussed...

"TypeError: Illegal invocation" in project with two bunyan deps at separate versions

TypeError: Illegal invocation

    at Socket._write (net.js:479:31)

    at Socket.write (net.js:466:15)

    at /home/mark/work/muskie/node_modules/bunyan/lib/bunyan.js:667:16

    at Array.forEach (native)

    at Logger._emit (/home/mark/work/muskie/node_modules/bunyan/lib/bunyan.js:663:16)

    at Logger.trace (/home/mark/work/muskie/node_modules/bunyan/lib/bunyan.js:709:8)

    at RetryOperation.retryCallback [as _fn] (/home/mark/work/muskie/node_modules/restify/lib/clients/http_client.js:216:21)

    at RetryOperation.attempt (/home/mark/work/muskie/node_modules/restify/node_modules/retry/lib/retry_operation.js:56:8)

    at JsonClient.request (/home/mark/work/muskie/node_modules/restify/lib/clients/http_client.js:207:19)

    at JsonClient.write (/home/mark/work/muskie/node_modules/restify/lib/clients/string_client.js:76:14)

Mark: I don't know why - it's because top level project X depends on bunyan
0.8. restify2.0 was stil dep'ing on 0.7. making restify dep on 0.8
so they match fixed the problem. I remember having similar problems
like this when things are doing instanceof and whatnot.

TODO: make a smaller repro case for this

optimize the 'search for a string' with `-c CONDITION`

$ time bunyan server.log -c 'this.req && this.req.username == "foo@bar"' --strict > filtered.slow.log

real    3m30.964s
user    3m30.708s
sys     0m0.474s
$ time grep 'foo@bar' server.log | bunyan -c 'this.req && this.req.username == "foo@bar"' --strict > filtered.fast.log

real    0m5.833s
user    0m6.986s
sys     0m0.162s

If that kind of use case is important (I think it might be common), then it is worth trying to optimize that.

Guessing that this is a simple string match out of a general JS block is gross. Perhaps a better explicit: bunyan -C req.username=foo@bar simplified style? That could then pre-grep (or equivalent).

Large objects

I often see stuff like this in my bunyan output:

[2012-09-16T03:11:26.564Z] ERROR: npm-www/69031 on 0803bb29-b3dc-4291-8633-a6bf53d4d3ff.local:  (worker=12)
    error: {
      "domain_emitter": {
        "output": [
          "HTTP/1.1 200 OK\r\nstrict-transport-security: 2592000000\r\netag: \"FCJtJOvYRL/8Q3H+2joOcLyPTvw=\"\r\nx-templar-stamp: pid=69031 worker=12 7759ed21d5d6da24f50ff0a3ce6e41d6f898d116 https://npmjs.org:10012\r

It'd be nice if a few common large objects were handled specially. In particular, HTTP request and response objects, and sockets, and buffers, all tend to be astronomical. Buffers should always be truncated so that they're also not so gigantic.

There's already a JSON stringifier function there, we could just use that.

Omit specific fields like hostname

My log output is overly verbose and I would like to reduce the included metadata, but it's not clear to me how to omit hostname, pid, etc. Could included fields be made configurable?

[2012-10-29T21:55:53.087Z] INFO: myLogger/86281 on hostname.local (/Users/me/dev/src/project/server/dao.js:235 in bigMethodName): something happened

If fields are configurable, could that be documented more clearly?

`[object Object]` in bunyan output

[2012-08-28T07:55:01.821Z]  INFO: amon-master/12592 on 4ed45644-f17f-4c9e-9ec9-1f4ab2d38eaf: Cr
eateProbeGroup handled: 200 (req_id=9daa4326-6ccf-4fac-a1a9-7886de318a41, 21ms, audit=true, rem
oteAddress=10.2.207.13, remotePort=50780, secure=false, _audit=true, req.version=*)
    POST /pub/930896af-bf8c-48d4-885c-6573a94b1853/probegroups HTTP/1.1
    user-agent: curl/7.21.2 (i386-pc-solaris2.11) libcurl/7.21.2 OpenSSL/0.9.8w zlib/1.2.3
    host: 10.2.207.16
    accept: application/json
    content-type: application/json
    content-length: 96

    [object Object]
    --
    HTTP/1.1 200 OK
    content-type: application/json
    content-length: 184
    access-control-allow-origin: *
    access-control-allow-headers: Accept, Accept-Version, Content-Length, Content-MD5, Content-Type, Date, X-Api-Version
    access-control-allow-methods: POST
    access-control-expose-headers: X-Api-Version, X-Request-Id, X-Response-Time
    connection: Keep-Alive
    content-md5: gwwdNdSqrdyFQIymiR3Ueg==
    date: Tue, 28 Aug 2012 07:55:01 GMT
    server: Amon Master/1.0.0
    x-request-id: 9daa4326-6ccf-4fac-a1a9-7886de318a41
    x-response-time: 21

    {"uuid":"d679ffe9-3089-4974-b981-f297b8fa966a","user":"930896af-bf8c-48d4-885c-6573a94b1853","contacts":["email"],"disabled":false,"name":"imgapi-e8ac9f10-32d7-4ff4-a974-a44aabb8966a"}
    --
    route: {
      "name": "CreateProbeGroup",
      "version": false
    }

with raw record:

{"name":"amon-master","hostname":"4ed45644-f17f-4c9e-9ec9-1f4ab2d38eaf","pid":12592,"audit":true,"level":30,"remoteAddress":"10.2.207.13","remotePort":50780,"req_id":"9daa4326-6ccf-4fac-a1a9-7886de318a41","req":{"method":"POST","url":"/pub/930896af-bf8c-48d4-885c-6573a94b1853/probegroups","headers":{"user-agent":"curl/7.21.2 (i386-pc-solaris2.11) libcurl/7.21.2 OpenSSL/0.9.8w zlib/1.2.3","host":"10.2.207.16","accept":"application/json","content-type":"application/json","content-length":"96"},"httpVersion":"1.1","trailers":{},"version":"*","body":{"name":"imgapi-e8ac9f10-32d7-4ff4-a974-a44aabb8966a","contacts":["email"]}},"res":{"statusCode":200,"headers":{"content-type":"application/json","content-length":184,"access-control-allow-origin":"*","access-control-allow-headers":"Accept, Accept-Version, Content-Length, Content-MD5, Content-Type, Date, X-Api-Version","access-control-allow-methods":"POST","access-control-expose-headers":"X-Api-Version, X-Request-Id, X-Response-Time","connection":"Keep-Alive","content-md5":"gwwdNdSqrdyFQIymiR3Ueg==","date":"Tue, 28 Aug 2012 07:55:01 GMT","server":"Amon Master/1.0.0","x-request-id":"9daa4326-6ccf-4fac-a1a9-7886de318a41","x-response-time":21},"trailer":false,"body":"{\"uuid\":\"d679ffe9-3089-4974-b981-f297b8fa966a\",\"user\":\"930896af-bf8c-48d4-885c-6573a94b1853\",\"contacts\":[\"email\"],\"disabled\":false,\"name\":\"imgapi-e8ac9f10-32d7-4ff4-a974-a44aabb8966a\"}"},"route":{"name":"CreateProbeGroup","version":false},"latency":21,"secure":false,"_audit":true,"msg":"CreateProbeGroup handled: 200","time":"2012-08-28T07:55:01.821Z","v":0}

Bunyan 0.13.3

grey color sucks on rm's dark terminal

screenshot: http://cl.ly/image/3I2e2G2Y0I02/o

rm: """I personally would probably just never enable colors.
Or at least, I'd rather have no color then what's there.
I find it hard to read."""

Suggest a BUNYAN_NO_COLOR env var.... or eventually a ~/.bunyanrc file support. But the envvar would be quicker to support.

Me: """originally the idea was that all the "extra" keys were bonus secondary data. However, really, the "extra" fields are becoming the meat. I.e. it argues for having the extra bits stand out more and the boilerplate, if anything, be the less obvious gray."""

Bunyan logger for each day?

Hello,

I want to wrap the bunyan logger with a function, so that I've the possibility to create a new log file for each day.

Instead of this:

 global.Log = bunyan.createLogger(
     name: "application"
     path: "log"
 )

I want to do something like this:

 global.Log = () -> 
     var filename = getFilename();
     bunyan.createLogger(
         name: "application"
         path: filename
     )

Could this cause any problems or does this override the old "application" logger?

Thank you
Torben

stream handling for childLog entries?

I need to write childLog entries (in my case audit relevant entries) to a file.

Docu doesn't mention so I tried the "intuitive" way:

var log = new Logger({
name: "my app", src: true,
streams: [
{
level: "info",
stream: process.stdout, // log INFO and above to stdout
},
{
level: "info",
component: "AUDIT",
path: "logs/audit.log" // log childLog AUDIT, level INFO and above to a file
}
]
});

No error but it does not work. Is this a planned feature?

bunyan tool crashes with Object.keys called on non-object

while running the tool like this:

$ myprog 2>&1 | ./node_modules/.bin/bunyan

i wil get this error sometimes:

/Users/vincent/devel/server/node_modules/bunyan/bin/bunyan:510
        Object.keys(headers).map(
               ^
TypeError: Object.keys called on non-object
    at Function.keys (native)
    at emitRecord (/Users/vincent/devel/server/node_modules/bunyan/bin/bunyan:510:16)
    at handleLogLine (/Users/vincent/devel/server/node_modules/bunyan/bin/bunyan:415:12)
    at Socket.<anonymous> (/Users/vincent/devel/server/node_modules/bunyan/bin/bunyan:674:7)
    at Socket.EventEmitter.emit (events.js:88:17)
    at Pipe.onread (net.js:398:31)
make: *** [run] Error 1

Bunyan not checking types

You need an Array.isArray check:

        server.on('after', restify.auditLogger({
            log: new Logger({
                name: 'audit',
                streams: {
                    level: 'info',
                    stream: process.stdout
                }
            })
        }));

throws:

TypeError: Object #<Object> has no method 'forEach'
    at new Logger (/Users/mark/work/cloudapi/node_modules/bunyan/lib/bunyan.js:311:21)
    at Object.createServer (/Users/mark/work/cloudapi/lib/app.js:178:18)
    at Object.<anonymous> (/Users/mark/work/cloudapi/main.js:90:18)
    at Module._compile (module.js:441:26)
    at Object..js (module.js:459:10)
    at Module.load (module.js:348:31)
    at Function._load (module.js:308:12)
    at Array.0 (module.js:479:10)
    at EventEmitter._tickCallback (node.js:192:40)

bunyan CLI crashes on "bad" -c

I was trying to filter my logs for restify audit records, so I thought I could do so with -c, but apparently not:

[root@64f18412 (webapi) ~]$ bunyan -c 'audit==true' `svcs -L muskie`
* * *
* The Bunyan CLI crashed! Please report this issue:
*
*    https://github.com/trentm/node-bunyan/issues/new
*
* and include the following Bunyan details the log file
* (or section of log file) on which the Bunyan CLI crashed.
* * *
* node version: v0.8.11
* bunyan version: 0.14.5
* argv: ["node","/opt/smartdc/muskie/node_modules/.bin/bunyan","--color","-c","audit==true","/var/svc/log/sds-application-muskie:default.log"]
* stack:
*     ReferenceError: audit is not defined
*         at bunyan-condition-0:7:1
*         at Script.Object.keys.forEach.(anonymous function) [as runInNewContext] (vm.js:41:22)
*         at filterRecord (/opt/smartdc/muskie/node_modules/bunyan/bin/bunyan:218:37)
*         at handleLogLine (/opt/smartdc/muskie/node_modules/bunyan/bin/bunyan:503:8)
*         at null.<anonymous> (/opt/smartdc/muskie/node_modules/bunyan/bin/bunyan:911:7)
*         at EventEmitter.emit (events.js:93:17)
*         at ReadStream._emitData (fs.js:1365:10)
*         at afterRead (fs.js:1347:10)
*         at Object.wrapper [as oncomplete] (fs.js:362:17)
* * *
[root@64f18412 (webapi) ~]$

`Cannot read property 'client_req' of undefined` error

{"name":"marlin_zone-agent","hostname":"757f7329-bc59-45be-9c7a-cb3e352cbef3","pid":20906,"log_id":"54a8272c-3cbb-4784-8099-01a79ff2476f","level":10,"client_req":{"method":"GET","url":"/task?wait=true","address":false,"headers":{"accept":"application/json","user-agent":"restify/1.0 (ia32-solaris; v8/3.11.10.17; OpenSSL/0.9.8w) node/0.8.5","date":"Thu, 30 Aug 2012 19:04:35 GMT"}},"attempt":1,"msg":"sending request","time":"2012-08-30T19:04:35.395Z","v":0}

Bunyan default output on that log:

$ by client_req_bug.log 

/Users/trentm/tm/node-bunyan/bin/bunyan:665
        req.client_req.httpVersion || "1.1",
           ^
TypeError: Cannot read property 'client_req' of undefined
    at emitRecord (/Users/trentm/tm/node-bunyan/bin/bunyan:665:12)
    at emitNextRecord (/Users/trentm/tm/node-bunyan/bin/bunyan:281:5)
    at gotRecord (/Users/trentm/tm/node-bunyan/bin/bunyan:207:3)
    at handleLogLine (/Users/trentm/tm/node-bunyan/bin/bunyan:509:10)
    at null.<anonymous> (/Users/trentm/tm/node-bunyan/bin/bunyan:910:7)
    at EventEmitter.emit (events.js:88:17)
    at ReadStream._emitData (fs.js:1362:10)
    at afterRead (fs.js:1344:10)
    at Object.wrapper [as oncomplete] (fs.js:362:17)

bunyan CLI crash: "Object.keys called on non-object"

$ echo '{"name":"cnapi.get_existing_nics","job_uuid":"3499b13e-dbca-4331-b13a-f164c0da320a","hostname":"710c784f-6aa5-428c-9074-e046c3af884e","pid":24440,"level":30,"nic":"<unknown>","res":"error: Unknown nic \"020820d753e0\"","msg":"got existing: 02:08:20:d7:53:e0","time":"2012-10-10T16:14:07.610Z","v":0}
' | by

/Users/trentm/tm/node-bunyan-0.x/bin/bunyan:718
      Object.keys(res).forEach(function (k) {
             ^
TypeError: Object.keys called on non-object
    at Function.keys (native)
    at emitRecord (/Users/trentm/tm/node-bunyan-0.x/bin/bunyan:718:14)
    at handleLogLine (/Users/trentm/tm/node-bunyan-0.x/bin/bunyan:507:12)
    at Socket.<anonymous> (/Users/trentm/tm/node-bunyan-0.x/bin/bunyan:856:7)
    at Socket.EventEmitter.emit (events.js:88:17)
    at Pipe.onread (net.js:391:31)

`[object Object]` in bunyan 'res' output

$ echo '{"name":"imgapi","hostname":"0525989e-2086-4270-b960-41dd661ebd7d","pid":73174,"audit":true,"level":30,"remoteAddress":"10.2.207.2","remotePort":63169,"req":{"method":"POST","url":"/images","headers":{"user-agent":"curl/7.27.0","host":"10.2.207.13","accept":"application/json","content-type":"application/json","content-length":"39"},"httpVersion":"1.1","trailers":{},"body":{"name":"foo","type":"zone-dataset"}},"res":{"statusCode":422,"headers":{"content-type":"application/json","content-length":54},"trailer":false,"body":{"message":"this went boom","name":"ValidationFailedError","statusCode":422,"body":{"code":"ValidationFailed","message":"this went boom"},"restCode":"ValidationFailed"}},"latency":6,"_audit":true,"msg":"handled: 422","time":"2012-10-05T04:32:35.715Z","src":{"file":"/opt/smartdc/imgapi/node_modules/restify/lib/plugins/audit.js","line":75,"func":"audit"},"v":0}' | bunyan
[2012-10-05T04:32:35.715Z]  INFO: imgapi/73174 on 0525989e-2086-4270-b960-41dd661ebd7d (/opt/smartdc/imgapi/node_modules/restify/lib/plugins/audit.js:75 in audit): handled: 422 (6ms, audit=true, remoteAddress=10.2.207.2, remotePort=63169, _audit=true)
    POST /images HTTP/1.1
    user-agent: curl/7.27.0
    host: 10.2.207.13
    accept: application/json
    content-type: application/json
    content-length: 39

    {
      "name": "foo",
      "type": "zone-dataset"
    }
    --
    HTTP/1.1 422 Unprocessable Entity
    content-type: application/json
    content-length: 54

    [object Object]

Exception thrown when disk fills up

To reproduce, create a tiny tmpfs, and have Bunyan write a few log messages to stdout, redirecting that to a file in the tmpfs. An exception is thrown. Wrapping it in an empty try/catch as follows at least prevents the exception, although I'm not sure if there's anything else that should be done in this case.

Index: lib/bunyan.js
===================================================================
--- lib/bunyan.js   (revision 8822)
+++ lib/bunyan.js   (working copy)
@@ -646,7 +646,10 @@
     if (s.level <= level) {
       xxx('writing log rec "%s" to "%s" stream (%d <= %d)', obj.msg, s.type,
         s.level, level);
-      s.stream.write(str);
+      try {
+        s.stream.write(str);
+      } catch (e3) {
+      }
     }
   });
 }

bunyan not trapping errors when serializers are busted (or non-existent)

/Users/mark/work/node-restify/node_modules/bunyan/lib/bunyan.js:583
var str = JSON.stringify(obj) + '\n';
^
TypeError: Converting circular structure to JSON
at Object.stringify (native)
at Logger._emit (/Users/mark/work/node-restify/node_modules/bunyan/lib/bunyan.js:583:18)
at Logger.trace (/Users/mark/work/node-restify/node_modules/bunyan/lib/bunyan.js:626:8)
at Route.run (/Users/mark/work/node-restify/lib/route.js:359:7)
at /Users/mark/work/node-restify/lib/server.js:451:18
at /Users/mark/work/node-restify/node_modules/async/lib/async.js:199:13
at /Users/mark/work/node-restify/node_modules/async/lib/async.js:126:25
at /Users/mark/work/node-restify/node_modules/async/lib/async.js:196:17
at /Users/mark/work/node-restify/node_modules/async/lib/async.js:499:34
at /Users/mark/work/node-restify/lib/server.js:434:12
bluesnoop:node-restify mark$

add filtering based on time

When looking at many logs at a go, it's often very convenient to filter based on time. A prototype fix, surely incomplete:

diff --git a/bin/bunyan b/bin/bunyan
index 80bd5f0..959518b 100755
--- a/bin/bunyan
+++ b/bin/bunyan
@@ -149,6 +149,15 @@ function printHelp() {
   console.log("                use the numeric values for filtering by level.")
   console.log("  --strict      Suppress all but legal Bunyan JSON log lines. By
   console.log("                non-JSON, and non-Bunyan lines are passed throug
+  console.log("  -t, --time TIME");
+  console.log("                Only show messages more recent than the specifie
+  console.log("                expressed as seconds in the past.  The time may"
+  console.log("                have an optional 'm', 'd' or 'w' suffix to denot
+  console.log("                minutes, days and weeks, respectively.  For exam
+  console.log("                `-t 5m` would emit all Bunyan log lines from wit
+  console.log("                the past five minutes.  (Note that non-Bunyan lo
+  console.log("                lines are passed through the time filter; see --
+  console.log("                above.)");
   console.log("");
   console.log("Output options:");
   console.log("  --color       Colorize output. Defaults to try if output");
@@ -213,6 +222,16 @@ function filterRecord(rec, opts)
     return false;
   }

+  if (opts.time) {
+    if (!rec.time)
+      return false;
+
+    var t = new Date(rec.time);
+
+    if (!isNaN(t.valueOf()) && t.valueOf() < opts.time)
+      return false;
+  }
+
   if (opts.conditions) {
     for (var i = 0; i < opts.conditions.length; i++) {
       var pass = opts.conditions[i].runInNewContext(rec);
@@ -303,7 +322,8 @@ function parseArgv(argv) {
     jsonIndent: 2,
     level: null,
     conditions: null,
-    strict: false
+    strict: false,
+    time: 0
   };

   // Turn '-iH' into '-i -H', except for argument-accepting options.
@@ -390,6 +410,21 @@ function parseArgv(argv) {
         }
         parsed.level = level;
         break;
+      case "-t":
+      case "--time":
+        var timeArg = args.shift();
+        var multiplier = { s: 1, m: 60, h: 3600, d: 86400, w: 604800 };
+        var m = 1, t;
+
+        if ((m = multiplier[timeArg[timeArg.length - 1]]) !== undefined)
+            timeArg = timeArg.substr(0, timeArg.length - 1);
+
+        if ((t = parseInt(timeArg, 10)) + '' != timeArg || isNaN(t) || t < 0)
+          throw new Error("invalid time value: '"+timeArg+"'");
+
+        parsed.time = new Date().valueOf() - (t * m * 1000);
+        break;
+
       case "-c":
       case "--condition":
         var condition = args.shift();

Broken package.json file

"// comment": "'mv' required for RotatingFileStream",

This line is breaking my npm install.
Node 0.8.8
npm 1.1.59

"raw" stream type

rent
actually I think I'd add a "raw" stream type, which means updating that here: https://github.com/trentm/node-bunyan/blob/master/lib/bunyan.js#L308-329
then update the _emit function here: https://github.com/trentm/node-bunyan/blob/master/lib/bunyan.js#L650-657 to call s.stream.write(obj) (instead of writing "str")

12:51
[email protected]
ah you mean rather than raw: true?

12:51
trent
yah
I don't see "raw: true" being useful for things like a "file" stream where the .write() method can only handle a string

12:52
[email protected]
right

12:53
trent
then I'd update https://github.com/trentm/node-bunyan/blob/master/lib/bunyan.js#L629-648 to be lazy. I.e. only stringify "obj" when you hit the first stream that isn't "raw".
this would mean checking the stream type for every stream for every log record... which is the hot path. An eventually faster way would be to have the "this._emitRawOnly", "this._emitMixed" and "this._emitNoRaw" methods and set "this._emit" to the appropriate one on Logger creation.
I could do that part tho (because Logger creation is finnicky because of log.child(...))

Ensuring writable stream is flushed on exception

Hi, this isn't really an issue w/ bunyan, but more of an FYI hack I'm using to ensure writable streams are flushed/closed when unhandled exceptions occur in a process.

For instance, the following will result in an empty foo.log file:

var Logger = require('bunyan'),
    util = require('util'),
    foo = new Logger({
        name: "foo",
        streams: [{
            path: "./foo.log"
        }]
    });

foo.info("hello");

throw new Error('suicide');

That stinks as the log file won't contain the "hello" entry, nor offer any clue as to what happened. A hack to rectify this:

var Logger = require('bunyan'),
    util = require('util'),
    foo = new Logger({
        name: "foo",
        streams: [{
            path: "./foo.log"
        }]
    });

foo.info("hello");

// using uncaughtException is bad m'kay
process.on('uncaughtException', function (err) {
    // prevent infinite recursion
    process.removeListener('uncaughtException', arguments.callee);

    // bonus: log the exception
    foo.fatal(err);

    if (typeof(foo.streams[0]) !== 'object') return;

    // throw the original exception once stream is closed
    foo.streams[0].stream.on('close', function(streamErr, stream) {
        throw err;
    });

    // close stream, flush buffer to disk
    foo.streams[0].stream.end();
});

throw new Error('suicide');

This probably makes node.js purists grind their teeth, but it's effective at logging both the "hello" entry and the exception, and rethrows the original exception.

Doing this w/ multiple streams would be trickier, as you'd have to detect that they were all closed before rethrowing the exception. I'm not sure that bunyan triggers a "close" event when all writable streams are closed, ie: foo.on('close', function(streamErr, stream) { throw err; });.

One last note, calling process.nextTick({ process.exit() }); instead of plain old process.exit(); usually gives the writable stream(s) a chance to flush.

Add log output handler plugins to bunyan cmd

Currently the bunyan cmd has a number of fixed output modes (OM_PAUL, OM_JSON, etc).

It would be great to be able to plug in custom handlers and filters (based on property matching/globbing or whatever). This is actually described briefly in this blog post:

records with a "metric" could feed to statsd, records with a "loggly: true" could feed to loggly.com

You can currently just patch the handleLogLine function to do this using your own custom logic, but it would be nice if a cleaner mechanism was supported out of the box.

trace/debug/info/error/fatal checks are broken in 0.6.3 (at least)

Yo,

So you have say this (this is in all the trace/debug/.. methods):

https://github.com/trentm/node-bunyan/blob/master/lib/bunyan.js#L867

But level is a function on the prototype:

https://github.com/trentm/node-bunyan/blob/master/lib/bunyan.js#L458

So the 'enabled' checks all fail, but so does logging itself, since you're checking against this.level, not this.level() or this._level.

Freaked me out why I wasn't seeing anything :)

m

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.