Streams for ponos's bunyan logger.
@private
@return {array} An array of streams for the bunyan logger
507661
function _getStreams (): Array<Stream> {
  const logLevel = process.env.LOG_LEVEL
  const level = parseInt(logLevel, 10) || logLevel || 'info'
  return [
    {
      level,
      stream: process.stdout
    }
  ]
}
326832
function() {
    var streams = this.sourceStreams = toArray(arguments);

    if(streams.length === 1) {
      this.any.apply(this, streams);
      return this;
    }

    this.resultStream = Bacon.zipAsArray(streams);

    this.streamsHash = this._computeStreamsHash('all', streams);

    // invalidate 'any'
    return this;
  }
944655
function() {
        var writer = new stream.Stream();

        writer.write = this.write;
        writer.end = this.end;

        return writer;
    }
221151
function (destPath, srcPaths, options) {
    let stream,
        b,
        finalPaths = [];
    return new Promise(function (resolve, reject) {
        _.each(srcPaths, function (path) {
            // deal with file globs
            if (glob.hasMagic(path)) {
                glob.sync(path).forEach((p) => {
                    p = utils.scopePaths(p);
                    finalPaths.push(p);
                });
            } else {
                path = utils.scopePaths(path);
                finalPaths.push(path);
            }
        });

        // add required parameters for watchify
        options.cache = {};
        options.packageCache = {};

        options.debug = options.watch;

        b = browserify(options);

        b.transform(envify({
            _: 'purge',
            NODE_ENV: options.env
        }), {global: true});

        // must add each path individual unfortunately.
        finalPaths.forEach(function (path) {
            b.add(path);
        });

        options.ignore.forEach((file) => {
            b.ignore(file);
        });
        options.exclude.forEach((file) => {
            b.exclude(file);
        });

        // require global files
        _.each(options.requires, function (path, id) {
            // options.requires can be an array of strings or an object
            id = typeof id == "string" ? id : path;
            b.require(path, {expose: id});
        });

        if (options.watch) {
            b.plugin(watchify);
            // re-bundle when updated
            b.on('update', function () {
                console.log('file updated!');
                b.bundle();
            });
        }


        b.on('bundle', function (stream) {
            console.log('browserifying bundle...');
            writeBrowserifyBundleStreamToFile(stream, destPath)
                .then(function () {
                    console.log('done browserifying bundle!');
                    resolve();
                })
                .catch(function (e) {
                    console.log('browserifying failed');
                    console.log(e);
                    reject(e);
                });
        });

        stream = b.bundle();

    }.bind(this));
}
920777
function StreamCopier() {
	var self = this
	stream.Stream.call(this)
	this.writable = true
	this.log = log
	this.write = write
	this.setPrepend = setPrepend
	this.pLog = pLog
	this.addStream = addStream
	this.removeStream = removeStream
	this.end = end
	this.destroy = destroy
	var prepend
	var streamIndex = 0
	var streams = {}

	function pLog() {
		commonLog(Array.prototype.slice.call(arguments), prepend)
	}

	function log() {
		commonLog(Array.prototype.slice.call(arguments))
	}

	function commonLog(args, prepend) {
		var s = util.format.apply(this, args) + '\n'
		if (prepend) s = prepend + ' ' + s
		write(s)
	}

	function setPrepend(s) {
		prepend = s ? String(s) : ''
		return self
	}

	function addStream(stream, name) {
		if (self.writable) {
			var i = streamIndex++
			streams[i] = {
				stream: stream,
				name: name
			}
		} else self.emit('error', 'Stream not writable')
		return i
	}

	function removeStream(no) {
		delete streams[no]
	}

	function write(s) {
		var err
		var didCb
		var args = Array.prototype.slice.call(arguments)
		var cb = typeof args[args.length - 1] === 'function' ? args.pop() : null

		var cbCounter = Object.keys(streams).length + 1
		for (var streamNo in streams) doWrite(streamNo)
		end()

		function doWrite(streamNo) {
			var stream = streams[streamNo].stream
			if (stream.writable) stream.write.apply(stream, args.concat(writeResult))
			else streamLost()

			function writeResult(e) {
				if (!e) end()
				else streamLost(e) // a write resulted in error
			}

			function streamLost(e) {
				var isError = Object.keys(streams).length == 1 // if we lost the last stream, it's error

				// emit the event
				eventType = isError ? 'error' : 'warning'
				var msg = 'Stream ' + streams[streamNo].name + ' no longer writable'
				if (e) msg += ': ' + err.msg
				self.emit(eventType, msg)
				delete streams[streamNo]

				if (isError) {
					if (!e) e = new Error(msg)
					self.writable = false
					end(e)
				} else write(msg, end) // write to remaining streams
			}
		}

		function end(e) {
			if (!err && e) err = e
			if (!err) {
				if (!--cbCounter && cb) {
					cb()
				}
			} else if (!didCb && cb) {
				didCb = true
				cb(err)
			}
		}
	}

	function end(s) {
		var err
		var args = Array.prototype.slice.call(arguments)
		var cb = typeof args[args.length - 1] === 'function' ? args.pop() : null
		var cbCounter = Object.keys(streams).length + 1

		if (args.length) write.apply(this, args.concat(allWritten))
		else allWritten()

		function allWritten(e) {
			if (e && !err) err = e
			for (var streamNo in streams) doEnd(streamNo)
			end()
		}

		function doEnd(streamNo) {
			streams[streamNo].stream.end(endResult)

			function endResult(e) {
				if (e) {
					if (!err) err = e
					self.emit('error', 'Stream ' + streams[streamNo].name + ' end error: ' + e.message)
				}
				delete streams[streamNo]
				end()
			}
		}

		function end() {
			if (!--cbCounter) {
				self.writable = false
				if (cb)
					if (err) cb(err)
					else cb()
			}
		}
	}

	function destroy(cb) {
		var cbCounter = Object.keys(streams).length + 1
		for (var streamNo in streams) doDestroy(streamNo)
		end()

		function doDestroy(streamNo) {
			streams[streamNo].stream.destroy(endResult)

			function destroyResult(e) {
				if (e) {
					if (!err) err = e
					self.emit('error', 'Stream ' + streams[streamNo].name + ' destroy error: ' + e.message)
				}
				delete streams[streamNo]
				end()
			}
		}

		function end() {
			if (!--cbCounter) {
				self.writable = false
				if (cb)
					if (err) cb(err)
					else cb()
			}
		}
	}
}
1231025
public LogStreamResponse getLogs(String appName, Boolean tail) {
        return connection.execute(new Log(appName, tail), apiKey);
    }
451701
function print() {
    getLoggers().forEach(function (logger) {
        consoleAppender.log(formatText('Logger %b: %b, parent:%b', logger.name, logger.level, logger.parent));
    });
}
322424
function Logger_write() {
            var log = this.logs.shift();

            if (log && (this.config.type === log.type || this.config.type === 'ALL')) {
                if (this.config.console) {
                    if (log.type === 'ERROR') {
                        exec_console(console.error, log, this.config.streamFormat);
                    } else if (log.type === 'INFO') {
                        exec_console(console.info, log, this.config.streamFormat);
                    } else if (log.type === 'WARNING') {
                        exec_console(console.warn, log, this.config.streamFormat);
                    } else {
                        exec_console(console.log, log, this.config.streamFormat);
                    }
                }

                if (this.stream) {
                    if (this.config.streamFormat === 'json') {
                        this.stream.write(JSON.stringify(log));
                        this.stream.write('\n');
                    } else {
                        this.stream.write('TYPE: ' + log.type);
                        this.stream.write('\n');
                        this.stream.write('CREATED: ' + log.created + '\t ');
                        this.stream.write('\n');
                        this.stream.write('MESSAGE: ' + log.message + '\t ' + log.trace);
                        this.stream.write('\n');
                        this.stream.write('DATA: ' + this.clean(log.data));
                        this.stream.write('\n');
                        this.stream.write('\n');
                    }
                }
                // clean log data for hook
                log.data = this.clean(log.data);
                // call log
                this.hooks.forEach(function (callback) {
                    callback(log);
                });
            }
            /**
             * Exec console output
             * @param func
             * @param log
             */
            function exec_console(func, log, format) {
                if (format === 'json') {
                    func(JSON.stringify(log));
                } else {
                    func(
                        ' ' + log.type + '\n',
                        'CREATED: ' + log.created + '\t ' + '\n',
                        'MESSAGE: ' + log.message + '\t ' + log.trace + '\n',
                        !!log.data ? 'DATA:' + log.data + '\n' : '',
                        '\n'
                    );
                }
            };
        }
395256
function() {
      var chunks = [];
      for (var i = 0, len = this.path.length; i < len; i++) {
        chunks.push(this.path[i].join(' '));
      }
      var path = chunks.join(' ');

      return [
        '<g transform="', this.getSvgTransform(), '">',
          '<path ',
            'width="', this.width, '" height="', this.height, '" ',
            'd="', path, '" ',
            'style="', this.getSvgStyles(), '" ',
            'transform="translate(', (-this.width / 2), ' ', (-this.height/2), ')" />',
        '</g>'
      ].join('');
    }
617280
function () {

                var stream = new $.streamqueue({
                    objectMode: true
                });

                //Optionally injected additional css sourcecode
                injectIntoStream(stream, options.injectInto.css.pre);

                // App files without vendor files
                stream.queue(gulp.src(options.files.cssNoVendor));

                //Optionally injected additional css sourcecode
                injectIntoStream(stream, options.injectInto.css.post);

                return stream
                    .done()
                    .pipe($.concat(options.output.css.app))
                    .pipe($.generateOutPipe(options.paths.build, options.output.css.path, 'app.css', options.rev, $.cssMinify)());
            }
1037405
function logWriteableStream(stream, colorFunction) {
        var write = stream.write;
        
        // The third parameter, callback, will be passed implicitely using arguments
        stream.write = function (chunk, encoding) {
            // Write to STDOUT right away
            try {
                write.apply(this, arguments);
            } catch (streamWriteError) { }
            
            writeToLog(chunk, encoding, colorFunction);
        };
    }
980115
function nodeStream(node) {
    var result = [];
    (function (node, offset) {
      for (var i = 0; i < node.childNodes.length; i++) {
        if (node.childNodes[i].nodeType == 3)
          offset += node.childNodes[i].nodeValue.length;
        else if (node.childNodes[i].nodeName == 'BR')
          offset += 1;
        else if (node.childNodes[i].nodeType == 1) {
          result.push({
            event: 'start',
            offset: offset,
            node: node.childNodes[i]
          });
          offset = arguments.callee(node.childNodes[i], offset);
          result.push({
            event: 'stop',
            offset: offset,
            node: node.childNodes[i]
          });
        }
      }
      return offset;
    })(node, 0);
    return result;
  }
1317226
function() {
    for (var i = 0, len = this.events.length; i < len; i++) {
      if (this.events[i].streamRevision > this.lastRevision) {
        this.lastRevision = this.events[i].streamRevision;
      }
    }

    return this.lastRevision;
  }
97919
function readFromStream(stream, callback) {
  var buf = [];
  stream.on("data", onData);
  stream.on("end", onEnd);
  stream.on("error", onError);

  function onData(data) {
    buf.push(data);
  }

  function onEnd() {
    if (callback) callback(null, buf.join(""));
    callback = null;
  }

  function onError(err) {
    if (callback) callback(err);
    callback = null;
  }
}
374577
function depsStream(deps) {
    var s = new stream.PassThrough({ objectMode: true });
    Rx.Node.writeToStream(deps, s);

    return function () {
        return s;
    };
}
950039
function createLoggerStream(name, level, logglyConfig) {
    const streams = [process.stdout];
    if (logglyConfig.enabled) {
        const logglyStream = new LogglyStream({
            token: logglyConfig.token,
            subdomain: logglyConfig.subdomain,
            name,
            environment: logglyConfig.environment,
        });
        streams.push(logglyStream);
    }
    return new UnionStream({ streams });
}
703180
function (config) {
        var stream =  new SplunkStream(config);
        /**
         * @typedef SplunkBunyanStream
         * @property {string} level The logging level for Bunyan.
         * @property {string} type Always <code>raw</code>.
         * @property {function} on Takes an <code>event</code> string, and a callback function.
         * The most useful event to listen for is <code>error</code>.
         * See {@link https://nodejs.org/api/events.html#events_emitter_on_event_listener|Node.js events} documentation.
         * @property {function} setEventFormatter Overrides the eventFormatter for the underlying SplunkLogger.
         * Takes a callback function parameter: <code>function(message, severity)</code>, where message
         * is an object, and severity is a string.
         * @property {function} on Adds a listener to to the SplunkStream object, typically used for the error event.
         * @property {function} flush Manually sends all queued events to Splunk in a single HTTP request.
         * Takes a callback function parameter: <code>function(err, response, body)</code>.
         * @property {SplunkStream} stream See {@link SplunkStream}
         */
        return {
            level: config.level || module.exports.levels.INFO,
            type: "raw",
            setEventFormatter: function(formatter) {
                this.stream.logger.eventFormatter = formatter;
            },
            on: function(event, callback) {
                this.stream.on(event, callback);
            },
            flush: function(callback) {
                // If flush is called with no param, use the send() callback
                callback = callback || this.stream.send;
                this.stream.logger.flush(callback);
            },
            stream: stream
        };
    }