You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

node-cloudfoundry-log-reader

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-cloudfoundry-log-reader

Simple library for read logs applications in Cloud Foundry (Pivotal) instances

0.0.3
latest
Source
npm
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

Simple library for read logs applications in Cloud Foundry (Pivotal) instances (only for version CF 182 and older)

Installation

$ npm install node-cloudfoundry-log-reader

Example

var cf = require('node-cloudfoundry-log-reader');

var params = {
    username: 'username',
    password: 'password',
    appGuid: 'guid',
    endpoints: {
        loggregator: 'loggregator.cf-domain.com',
        login: 'login.cf-domain.com',
        port: 4443, // port need only for ws (tail log) default value 4443
        ssl: true
    }
};

/**
 * Example: cf logs app-name --recent
 */

cf.recent(params, function (error, data) {
    console.log(cf.clean(data));
});

/**
 * Example: cf logs app-name
 */

cf.tail(params, function (socket) {
    socket.on('open', function () {
        console.log('connected');
    });
    socket.on('close', function () {
        console.log('disconnected');
    });
    socket.on('message', function (data) {
        console.log(cf.clean(data.toString()));
    });
    socket.on('error', function () {
        console.log(arguments);
    });
});

More Information

  • Streaming logs

Contributors

License

MIT

Keywords

api

FAQs

Package last updated on 22 Oct 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts