Skip to content

client.logs.byApp - path does not exist. #28

@doguhanokumus

Description

@doguhanokumus

Hi,

According to the docs, when I create a client and then run a logs.byApp, as follows:

var nj = require('nodejitsu-api');

var njc = nj.createClient({
  username: 'wildcardlabs',
  password: 'secret',
  remoteUri: 'https://api.nodejitsu.com'
});

njc.logs.byApp('my-app', 50, function (err, data) {
  console.log(err)
  console.log(data);
});

I get an error:

[Error: Invalid options, must provide a logs service host]

Thus, I've looked into the code and found out that there is a return case when I don't supply "logs.host" in the config.

var njc = nj.createClient({
  username: 'wildcardlabs',
  password: 'secret',
  remoteUri: 'https://api.nodejitsu.com',
  logs: {host:"api.nodejitsu.com"}
});

But when I try with this alteration, I get another error telling that the path does not exist:

{ error: { error: 'Could not find path: /logs/wildcardlabs/my-app/50' } }                

Note: Actual app name has been replaced by "my-app"

Am I missing something or doing something wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions