Skip to content
This repository was archived by the owner on Dec 29, 2024. It is now read-only.

Commit 41a6c3d

Browse files
author
Michael
committed
Rollbar Integration (Error Logging)
1 parent 4817f58 commit 41a6c3d

File tree

5 files changed

+210
-8
lines changed

5 files changed

+210
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ I use [SemVer](http://semver.org/) for versioning. For the versions available, s
6767

6868
## Authors
6969

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

7272

7373

ace.php

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
/**
66
* AceProject CLI
7-
* (c) 2019 by Michael Milawski, www.millsoft.de
7+
* (c) 2019 by Michael Milawski.
88
*/
99

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

30+
use \Rollbar\Rollbar;
31+
use \Rollbar\Payload\Level;
3032

3133
class Ace
3234
{
3335

36+
37+
/**
38+
* Enable error logging by Rollbar.
39+
*/
40+
private static function initErrorLogging(){
41+
42+
Rollbar::init(
43+
array(
44+
'access_token' => '66edf28d2ae349599b3f24d99c08467e',
45+
'environment' => 'production'
46+
)
47+
);
48+
49+
}
50+
3451
/**
3552
* Initialize the whole CLI system
3653
*/
3754
public static function init ()
3855
{
56+
self::initErrorLogging();
3957
Helper::initSession();
4058

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

4866
$header = <<<header
4967
Version: $version
50-
Last Update: 22 March 2019
5168
(c) 2019 by Michael Milawski
5269
header;
5370

composer.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
{
22
"name": "millsoft/acetool",
33
"type": "project",
4-
"version" : "1.0.4",
4+
"version" : "1.0.5",
55
"require": {
66
"millsoft/aceproject": "^0",
7-
"symfony/console": "^4.1"
7+
"symfony/console": "^4.1",
8+
"rollbar/rollbar": "~1.5"
89
},
910
"autoload": {
1011
"psr-4": {
@@ -16,7 +17,7 @@
1617
{
1718
"name": "Michael Milawski",
1819
"email": "mm@millsoft.de",
19-
"homepage": "http://www.millsoft.de",
20+
"homepage": "https://www.milmike.com",
2021
"role": "Developer"
2122
}
2223
],

composer.lock

Lines changed: 185 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.4
1+
1.0.5

0 commit comments

Comments
 (0)