diff --git a/.docs/README.md b/.docs/README.md index f7f2923..2c169ae 100644 --- a/.docs/README.md +++ b/.docs/README.md @@ -24,13 +24,15 @@ logging: Basically, it overrides Tracy's default logger by our universal, pluggable logger. +Original logger is still in DIC with `logging.originalLogger` key. + ### Default loggers There are 3 types of loggers defined by default. - **FileLogger** - creates .log file -- **BlueScreenFileLogger** - creates exception-*.html -- **SendMailLogger** - sends exception to email +- **BlueScreenFileLogger** - creates exception-*.html from all throwable +- **SendMailLogger** - sends throwable/message to email You can redefine these loggers in `logging.loggers`. @@ -48,7 +50,23 @@ logging: ) - App\Model\MyCustomerLogger ``` - + +This configuration is functionally equal to original Tracy's logger, only separated to multiple classes. + +#### SendMailLogger + +Our SendMailLogger also allows configure priority levels. + +```yaml +services: + sendMaillogger: + setup: + - setAllowedPriority( + Contributte\Logging\ILogger::WARNING, + Contributte\Logging\ILogger::ERROR + ) +``` + ### Custom logger To create your custom logger you have to implement `Contributte\Logging\ILogger`. @@ -170,3 +188,19 @@ There you obtained DNS url. Put the url into neon file. sentry: url: https://@sentry.io/ ``` + +`SentryLoggingExtension` adds `SentryLogger` with url configuration. It works as [SendMailLogger](#sendmaillogger). + +It means that it sends messages/throwable with `ILogger::ERROR`, `ILogger::EXCEPTION`, `ILogger::CRITICAL` priorities. + +But if you need other priorities, you can change configuration. + +```yaml +services: + sentry.logger: + setup: + - setAllowedPriority( + Contributte\Logging\ILogger::WARNING, + Contributte\Logging\ILogger::ERROR + ) +``` diff --git a/README.md b/README.md index b38d277..85c1eba 100644 --- a/README.md +++ b/README.md @@ -26,8 +26,8 @@ composer require contributte/logging | State | Version | Branch | PHP | |-------------|--------------|----------|----------| -| development | `dev-master` | `master` | `>= 5.6` | -| stable | `^0.2` | `master` | `>= 5.6` | +| development | `dev-master` | `master` | `>= 7.1` | +| stable | `^0.3` | `master` | `>= 7.1` | ## Overview diff --git a/composer.json b/composer.json index 78526cd..efb615d 100644 --- a/composer.json +++ b/composer.json @@ -60,7 +60,7 @@ }, "extra": { "branch-alias": { - "dev-master": "0.3.x-dev" + "dev-master": "0.4.x-dev" } } }