Skip to content

Commit 33568a5

Browse files
committed
Use correct method for getting and flushing logs
1 parent 7e716cb commit 33568a5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/Sentry/Features/LogLogsIntegrationTest.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use Illuminate\Support\Facades\Log;
77
use Sentry\Laravel\Tests\TestCase;
88
use Sentry\Logs\LogLevel;
9+
use function Sentry\logger;
910

1011
class LogLogsIntegrationTest extends TestCase
1112
{
@@ -107,6 +108,10 @@ public function testLogChannelAddsContextAsAttributes(): void
107108
/** @return \Sentry\Logs\Log[] */
108109
private function getAndFlushCapturedLogs(): array
109110
{
110-
return \Sentry\logger()->aggregator()->flushWithoutEvent();
111+
$logs = logger()->aggregator()->all();
112+
113+
logger()->aggregator()->flush();
114+
115+
return $logs;
111116
}
112117
}

0 commit comments

Comments
 (0)