Skip to content

Commit a32c6ef

Browse files
committed
added logging only
1 parent d4aa18c commit a32c6ef

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/MonitoredCommand.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,16 @@ protected function completeSignature()
7878
*/
7979
public function commandRecord()
8080
{
81+
logger('isset($this->record) ?', [isset($this->record)]);
8182
if (isset($this->record)) {
83+
logger('use this record that exists', [$this->record]);
8284
return $this->record;
8385
}
8486

87+
logger("this->option(command-record-id)", [$this->option('command-record-id')]);
8588
if ($id = $this->option('command-record-id')) {
8689
$this->record = CommandRecord::find($id);
90+
logger('use this existing record', [$this->record]);
8791

8892
return $this->record;
8993
}
@@ -94,6 +98,7 @@ public function commandRecord()
9498
'options' => $this->options(),
9599
'result' => '',
96100
]);
101+
logger('None: create Command Record', [$this->record]);
97102

98103
return $this->record;
99104
}
@@ -157,6 +162,8 @@ protected function passesChecks()
157162
}
158163
}
159164

165+
logger('$this->commandRecord()->hasStarted()', [$this->commandRecord()]);
166+
160167
if ($this->commandRecord()->hasStarted()) {
161168
throw new \Exception('The monitored command ' . $this->commandRecord()->id . ' has already started.');
162169
}

0 commit comments

Comments
 (0)