Skip to content

Commit f44eba9

Browse files
committed
feat: remove support for LogWithClassPath
BREAKING CHANGE
1 parent ce7d019 commit f44eba9

File tree

3 files changed

+0
-141
lines changed

3 files changed

+0
-141
lines changed

README.md

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ A library with logging enhancement. Including:
88

99
- `LoggerFacade` facade
1010
- It extends default Laravel `Log` facade with logging adding class path and tracking id into context.
11-
- `LogWithClassPath` trait (*deprecated*)
12-
- It adds convinient methods for logging to add class path and tracking id into context.
1311
- `LogglyHandler` class
1412
- It extends monolog's LogglyHandler with tags support
1513

@@ -46,42 +44,6 @@ The log json will look like this:
4644
}
4745
```
4846

49-
### LogWithClassPath Trait (*deprecated*)
50-
51-
Use `LogWithClassPath` trait to let it automatically put class path into log context. You can refer to following code example.
52-
53-
```php
54-
namespace App;
55-
56-
use Onramplab\LaravelLogEnhancement\Concerns\LogWithClassPath;
57-
58-
class Fake {
59-
use LogWithClassPath;
60-
61-
public function run()
62-
{
63-
$this->info('Test');
64-
}
65-
}
66-
```
67-
68-
The log json will look like this:
69-
70-
```json
71-
{
72-
"message": "Test",
73-
"context": {
74-
"class_path": "App\\Fake",
75-
"tracking_id": "652c3456-1a17-42b8-9fa7-9bee65e655eb"
76-
},
77-
"level": 200,
78-
"level_name": "INFO",
79-
"channel": "local",
80-
"extra": {},
81-
"timestamp": "2021-01-04T22:47:56.598608-0800"
82-
}
83-
```
84-
8547
### LogglyHandler
8648

8749
You can adding following block into `config/logging.php`.

src/Concerns/LogWithClassPath.php

Lines changed: 0 additions & 63 deletions
This file was deleted.

tests/Unit/Concerns/LogWithClassPathTest.php

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)