Skip to content

Commit

Permalink
Rollbar Integration (Error Logging)
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael committed Jul 28, 2019
1 parent 4817f58 commit 41a6c3d
Show file tree
Hide file tree
Showing 5 changed files with 210 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ I use [SemVer](http://semver.org/) for versioning. For the versions available, s

## Authors

* **Michael Milawski** - *Initial work* - [Millsoft](http://www.millsoft.de)
* **Michael Milawski** - *Initial work* - [MilMike](https://www.milmike.com)



Expand Down
21 changes: 19 additions & 2 deletions ace.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

/**
* AceProject CLI
* (c) 2019 by Michael Milawski, www.millsoft.de
* (c) 2019 by Michael Milawski.
*/

$autoload_file = __DIR__ . "/vendor/autoload.php";
Expand All @@ -27,15 +27,33 @@
use Millsoft\AceTool\Commands\TaskCommands;
use Millsoft\AceTool\Commands\UserCommands;

use \Rollbar\Rollbar;
use \Rollbar\Payload\Level;

class Ace
{


/**
* Enable error logging by Rollbar.
*/
private static function initErrorLogging(){

Rollbar::init(
array(
'access_token' => '66edf28d2ae349599b3f24d99c08467e',
'environment' => 'production'
)
);

}

/**
* Initialize the whole CLI system
*/
public static function init ()
{
self::initErrorLogging();
Helper::initSession();

$versionFile = __DIR__ . "/version.txt";
Expand All @@ -47,7 +65,6 @@ public static function init ()

$header = <<<header
Version: $version
Last Update: 22 March 2019
(c) 2019 by Michael Milawski
header;

Expand Down
7 changes: 4 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{
"name": "millsoft/acetool",
"type": "project",
"version" : "1.0.4",
"version" : "1.0.5",
"require": {
"millsoft/aceproject": "^0",
"symfony/console": "^4.1"
"symfony/console": "^4.1",
"rollbar/rollbar": "~1.5"
},
"autoload": {
"psr-4": {
Expand All @@ -16,7 +17,7 @@
{
"name": "Michael Milawski",
"email": "[email protected]",
"homepage": "http://www.millsoft.de",
"homepage": "https://www.milmike.com",
"role": "Developer"
}
],
Expand Down
186 changes: 185 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.4
1.0.5

0 comments on commit 41a6c3d

Please sign in to comment.