This repository was archived by the owner on Feb 7, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +53
-2
lines changed Expand file tree Collapse file tree 3 files changed +53
-2
lines changed Original file line number Diff line number Diff line change 191191 | store them into an array and then store them into the database
192192 | on each interval.
193193 |
194+ | You can opt-in to avoid any statistics storage by setting the logger
195+ | to the built-in NullLogger.
196+ |
194197 */
195198
196- 'logger ' => BeyondCode \LaravelWebSockets \Statistics \Logger \HttpStatisticsLogger::class,
199+ 'logger ' => \BeyondCode \LaravelWebSockets \Statistics \Logger \HttpStatisticsLogger::class,
200+ // 'logger' => \BeyondCode\LaravelWebSockets\Statistics\Logger\NullStatisticsLogger::class,
197201
198202 /*
199203 |--------------------------------------------------------------------------
Original file line number Diff line number Diff line change 66use Illuminate \Support \Facades \Facade ;
77
88/**
9- * @see \BeyondCode\LaravelWebSockets\Statistics\Logger\HttpStatisticsLogger
9+ * @see \BeyondCode\LaravelWebSockets\Statistics\Logger\HttpStatisticsLogger
1010 * @mixin \BeyondCode\LaravelWebSockets\Statistics\Logger\HttpStatisticsLogger
1111 */
1212class StatisticsLogger extends Facade
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace BeyondCode \LaravelWebSockets \Statistics \Logger ;
4+
5+ use BeyondCode \LaravelWebSockets \WebSockets \Channels \ChannelManager ;
6+ use Clue \React \Buzz \Browser ;
7+ use Ratchet \ConnectionInterface ;
8+
9+ class NullStatisticsLogger implements StatisticsLogger
10+ {
11+ /** @var \BeyondCode\LaravelWebSockets\WebSockets\Channels\ChannelManager */
12+ protected $ channelManager ;
13+
14+ /** @var \Clue\React\Buzz\Browser */
15+ protected $ browser ;
16+
17+ public function __construct (ChannelManager $ channelManager , Browser $ browser )
18+ {
19+ $ this ->channelManager = $ channelManager ;
20+ $ this ->browser = $ browser ;
21+ }
22+
23+ public function webSocketMessage (ConnectionInterface $ connection )
24+ {
25+ //
26+ }
27+
28+ public function apiMessage ($ appId )
29+ {
30+ //
31+ }
32+
33+ public function connection (ConnectionInterface $ connection )
34+ {
35+ //
36+ }
37+
38+ public function disconnection (ConnectionInterface $ connection )
39+ {
40+ //
41+ }
42+
43+ public function save ()
44+ {
45+ //
46+ }
47+ }
You can’t perform that action at this time.
0 commit comments