Skip to content

Commit e028e0a

Browse files
committed
feat: enhance logging error handling with Push exception
- Updated `composer.json` to require `utopia-php/console`. - Modified `Logger` class to catch `Push` exceptions during log pushes and log detailed error messages. - Updated `Adapter` implementations (AppSignal, LogOwl, Raygun, Sentry) to throw `Push` exceptions on failure instead of returning error codes.
1 parent b19cf23 commit e028e0a

9 files changed

Lines changed: 459 additions & 269 deletions

File tree

composer.json

Lines changed: 51 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,53 @@
11
{
2-
"name": "utopia-php/logger",
3-
"description": "Utopia Logger library is simple and lite library for logging information, such as errors or warnings. This library is aiming to be as simple and easy to learn and use.",
4-
"type": "library",
5-
"keywords": ["php","framework", "upf", "utopia", "logger", "logging", "errors", "warnings", "logs", "sentry", "raygun", "appsignal"],
6-
"license": "MIT",
7-
"scripts": {
8-
"check": "./vendor/bin/phpstan analyse --level max src tests",
9-
"lint": "./vendor/bin/pint --test",
10-
"format": "./vendor/bin/pint",
11-
"test-unit": "./vendor/bin/phpunit --configuration phpunit.xml --testsuite unit --debug",
12-
"test-e2e": "./vendor/bin/phpunit --configuration phpunit.xml --testsuite e2e --debug",
13-
"test": [
14-
"@test-unit",
15-
"@test-e2e"
16-
]
17-
},
18-
"autoload": {
19-
"psr-4": {"Utopia\\Logger\\": "src/Logger"}
20-
},
21-
"autoload-dev": {
22-
"psr-4": {
23-
"Utopia\\Tests\\E2E\\":"tests/e2e",
24-
"Utopia\\Tests\\Unit\\":"tests/unit"
25-
}
26-
},
27-
"require": {
28-
"php": ">=8.0"
29-
},
30-
"require-dev": {
31-
"phpunit/phpunit": "^9.3",
32-
"vimeo/psalm": "4.0.1",
33-
"laravel/pint": "1.2.*",
34-
"phpstan/phpstan": "1.9.x-dev"
35-
},
36-
"minimum-stability": "dev"
2+
"name": "utopia-php/logger",
3+
"description": "Utopia Logger library is simple and lite library for logging information, such as errors or warnings. This library is aiming to be as simple and easy to learn and use.",
4+
"type": "library",
5+
"keywords": [
6+
"php",
7+
"framework",
8+
"upf",
9+
"utopia",
10+
"logger",
11+
"logging",
12+
"errors",
13+
"warnings",
14+
"logs",
15+
"sentry",
16+
"raygun",
17+
"appsignal"
18+
],
19+
"license": "MIT",
20+
"scripts": {
21+
"check": "./vendor/bin/phpstan analyse --level max src tests",
22+
"lint": "./vendor/bin/pint --test",
23+
"format": "./vendor/bin/pint",
24+
"test-unit": "./vendor/bin/phpunit --configuration phpunit.xml --testsuite unit --debug",
25+
"test-e2e": "./vendor/bin/phpunit --configuration phpunit.xml --testsuite e2e --debug",
26+
"test": [
27+
"@test-unit",
28+
"@test-e2e"
29+
]
30+
},
31+
"autoload": {
32+
"psr-4": {
33+
"Utopia\\Logger\\": "src/Logger"
3734
}
35+
},
36+
"autoload-dev": {
37+
"psr-4": {
38+
"Utopia\\Tests\\E2E\\": "tests/e2e",
39+
"Utopia\\Tests\\Unit\\": "tests/unit"
40+
}
41+
},
42+
"require": {
43+
"php": ">=8.0",
44+
"utopia-php/console": "^0.1"
45+
},
46+
"require-dev": {
47+
"phpunit/phpunit": "^9.3",
48+
"vimeo/psalm": "4.0.1",
49+
"laravel/pint": "1.2.*",
50+
"phpstan/phpstan": "1.9.x-dev"
51+
},
52+
"minimum-stability": "dev"
53+
}

0 commit comments

Comments
 (0)