Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some support for CLI programs #40

Closed
vilius-g opened this issue Jan 5, 2015 · 4 comments
Closed

Some support for CLI programs #40

vilius-g opened this issue Jan 5, 2015 · 4 comments

Comments

@vilius-g
Copy link
Contributor

vilius-g commented Jan 5, 2015

As I understand, Rollbar is built with the assumption of an HTTP request. Still, it would be good to have at least some support for command line programs.

Now it just sets the URL to http://unknown/ and everything else to None. It makes very hard to determine in what context the error has occurred.

It would be nice if at least the command line arguments were included in the error details.

@brianr
Copy link
Member

brianr commented Jan 6, 2015

Agreed @vilius-g -- better support for CLI makes good sense.

If you want to take a stab at this, the things to do are:

  • detect whether we're running in a web request or CLI
  • if CLI:

@nodesocket
Copy link

To detect if a cli or web request, the following should work:

$cli = false;
if(strtolower(php_sapi_name()) === "cli") {
    $cli = true;
}

@nocive
Copy link
Contributor

nocive commented Apr 11, 2016

👍 this is something we really miss after switching to rollbar as our primary error reporting tool

@Crisfole
Copy link
Contributor

#80

Crisfole added a commit that referenced this issue Apr 21, 2016
Add basic command line support (#40)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants