File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# CHANGELOG
22
3+ ## 4.15.2
4+
5+ The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v4.15.2.
6+
7+ ### Bug Fixes
8+
9+ - Ensure handle only processes records permitted by their log level. [ (#1888 )] ( https://github.com/getsentry/sentry-php/pull/1888 )
10+
311## 4.15.1
412
513The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v4.15.1.
@@ -22,26 +30,26 @@ The Sentry SDK team is happy to announce the immediate availability of Sentry PH
2230 use Monolog\Logger;
2331 use Sentry\Monolog\LogsHandler;
2432 use Sentry\Logs\LogLevel;
25-
33+
2634 // Initialize Sentry SDK first (make sure 'enable_logs' is set to true)
2735 \Sentry\init([
2836 'dsn' => '__YOUR_DSN__',
2937 'enable_logs' => true,
3038 ]);
31-
39+
3240 // Create a Monolog logger
3341 $logger = new Logger('my-app');
34-
42+
3543 // Add the Sentry logs handler
3644 // Optional: specify minimum log level (defaults to LogLevel::debug())
3745 $handler = new LogsHandler(LogLevel::info());
3846 $logger->pushHandler($handler);
39-
47+
4048 // Now your logs will be sent to Sentry
4149 $logger->info('User logged in', ['user_id' => 123]);
4250 $logger->error('Payment failed', ['order_id' => 456]);
4351 ```
44-
52+
4553 Note: The handler will not collect logs for exceptions (they should be handled separately via ` captureException ` ).
4654
4755### Bug Fixes
You can’t perform that action at this time.
0 commit comments