generated from spatie/package-skeleton-laravel
-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
984 additions
and
287 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# New Occurrence | ||
|
||
**Log Level:** {level} | ||
|
||
{message} | ||
|
||
**Simplified Stack Trace:** | ||
```php | ||
{simplified_stack_trace} | ||
``` | ||
|
||
<details> | ||
<summary>Complete Stack Trace</summary> | ||
|
||
```php | ||
{full_stack_trace} | ||
``` | ||
</details> | ||
|
||
<details> | ||
<summary>Previous Exceptions</summary> | ||
|
||
{previous_exceptions} | ||
</details> | ||
|
||
{context} | ||
|
||
{extra} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
**Log Level:** {level} | ||
|
||
{message} | ||
|
||
**Simplified Stack Trace:** | ||
```php | ||
{simplified_stack_trace} | ||
``` | ||
|
||
<details> | ||
<summary>Complete Stack Trace</summary> | ||
|
||
```php | ||
{full_stack_trace} | ||
``` | ||
</details> | ||
|
||
<details> | ||
<summary>Previous Exceptions</summary> | ||
|
||
{previous_exceptions} | ||
</details> | ||
|
||
{context} | ||
|
||
{extra} | ||
|
||
<!-- Signature: {signature} --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
### Previous Exception #{count} | ||
**Type:** {type} | ||
|
||
**Simplified Stack Trace:** | ||
```php | ||
{simplified_stack_trace} | ||
``` | ||
|
||
<details> | ||
<summary>Complete Stack Trace</summary> | ||
|
||
```php | ||
{full_stack_trace} | ||
``` | ||
</details> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?php | ||
|
||
namespace Naoray\LaravelGithubMonolog; | ||
|
||
use Illuminate\Support\ServiceProvider; | ||
use Naoray\LaravelGithubMonolog\Issues\Formatters\ExceptionFormatter; | ||
use Naoray\LaravelGithubMonolog\Issues\Formatters\IssueFormatter; | ||
use Naoray\LaravelGithubMonolog\Issues\Formatters\StackTraceFormatter; | ||
use Naoray\LaravelGithubMonolog\Issues\StubLoader; | ||
use Naoray\LaravelGithubMonolog\Issues\TemplateRenderer; | ||
|
||
class GithubMonologServiceProvider extends ServiceProvider | ||
{ | ||
public function register(): void | ||
{ | ||
$this->app->bind(StackTraceFormatter::class); | ||
$this->app->bind(StubLoader::class); | ||
$this->app->bind(ExceptionFormatter::class, function ($app) { | ||
return new ExceptionFormatter( | ||
stackTraceFormatter: $app->make(StackTraceFormatter::class), | ||
); | ||
}); | ||
|
||
$this->app->singleton(TemplateRenderer::class, function ($app) { | ||
return new TemplateRenderer( | ||
exceptionFormatter: $app->make(ExceptionFormatter::class), | ||
stubLoader: $app->make(StubLoader::class), | ||
); | ||
}); | ||
|
||
$this->app->singleton(IssueFormatter::class, function ($app) { | ||
return new IssueFormatter( | ||
templateRenderer: $app->make(TemplateRenderer::class), | ||
); | ||
}); | ||
} | ||
|
||
public function boot(): void | ||
{ | ||
if ($this->app->runningInConsole()) { | ||
$this->publishes([ | ||
__DIR__ . '/../resources/views' => resource_path('views/vendor/github-monolog'), | ||
], 'github-monolog-views'); | ||
} | ||
} | ||
} |
Oops, something went wrong.