Skip to content

Commit 059a51b

Browse files
SaveNewLogEvent dispatch fix
1 parent b4b9964 commit 059a51b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/LogToDB.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,16 +169,16 @@ public function newFromMonolog(LogRecord $record)
169169
}
170170
if (!empty($this->config['queue'])) {
171171
if (empty($this->config['queue_name']) && empty($this->config['queue_connection'])) {
172-
dispatch(new SaveNewLogEvent($this, $record));
172+
dispatch(new SaveNewLogEvent($record));
173173
} else if (!empty($this->config['queue_name']) && !empty($this->config['queue_connection'])) {
174-
dispatch(new SaveNewLogEvent($this, $record))
174+
dispatch(new SaveNewLogEvent($record))
175175
->onConnection($this->config['queue_connection'])
176176
->onQueue($this->config['queue_name']);
177177
} else if (!empty($this->config['queue_connection'])) {
178-
dispatch(new SaveNewLogEvent($this, $record))
178+
dispatch(new SaveNewLogEvent($record))
179179
->onConnection($this->config['queue_connection']);
180180
} else if (!empty($this->config['queue_name'])) {
181-
dispatch(new SaveNewLogEvent($this, $record))
181+
dispatch(new SaveNewLogEvent($record))
182182
->onQueue($this->config['queue_name']);
183183
}
184184
} else {

tests/LogToDbTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ public function testSaveNewLogEventJob()
332332
formatted: "[2019-10-04T17:26:38.446827+00:00] local.INFO: test [] []\n",
333333
);
334334

335-
$job = new SaveNewLogEvent($logToDb, $record);
335+
$job = new SaveNewLogEvent($record);
336336
$job->handle();
337337

338338
$this->assertNotEmpty($logToDb->model()->where('message', '=', 'job-test')->get());

0 commit comments

Comments
 (0)