Add debug logging.

This commit is contained in:
James Cole 2017-10-30 17:31:31 +01:00
parent 5722622251
commit 82dc0d4aac
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E

View File

@ -198,33 +198,40 @@ class Search implements SearchInterface
case 'amount_is':
case 'amount':
$amount = app('steam')->positive(strval($modifier['value']));
Log::debug('Set "%s" using collector with value "%s"', $modifier['type'], $amount);
$collector->amountIs($amount);
break;
case 'amount_min':
case 'amount_less':
$amount = app('steam')->positive(strval($modifier['value']));
Log::debug('Set "%s" using collector with value "%s"', $modifier['type'], $amount);
$collector->amountLess($amount);
break;
case 'amount_max':
case 'amount_more':
$amount = app('steam')->positive(strval($modifier['value']));
Log::debug('Set "%s" using collector with value "%s"', $modifier['type'], $amount);
$collector->amountMore($amount);
break;
case 'type':
$collector->setTypes([ucfirst($modifier['value'])]);
Log::debug('Set "%s" using collector with value "%s"', $modifier['type'], $modifier['value']);
break;
case 'date':
case 'on':
Log::debug('Set "%s" using collector with value "%s"', $modifier['type'], $modifier['value']);
$start = new Carbon($modifier['value']);
$collector->setRange($start, $start);
break;
case 'date_before':
case 'before':
Log::debug('Set "%s" using collector with value "%s"', $modifier['type'], $modifier['value']);
$before = new Carbon($modifier['value']);
$collector->setBefore($before);
break;
case 'date_after':
case 'after':
Log::debug('Set "%s" using collector with value "%s"', $modifier['type'], $modifier['value']);
$after = new Carbon($modifier['value']);
$collector->setBefore($after);
break;