Skip to content

Commit c4c11ab

Browse files
Update ActivityLogger.php
Only use the default crawler description if none is provided. At the moment, if a Guzzle / Get request is made by a controller there is no way to provide your own description using ActivityLogger::activity('my description'); as it defaults to the crawler description.
1 parent 40749ba commit c4c11ab

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/App/Http/Traits/ActivityLogger.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ public static function activity($description = null)
3030

3131
if (Crawler::isCrawler()) {
3232
$userType = trans('LaravelLogger::laravel-logger.userTypes.crawler');
33-
$description = $userType.' '.trans('LaravelLogger::laravel-logger.verbTypes.crawled').' '.Request::fullUrl();
33+
if(is_null($description)){
34+
$description = $userType.' '.trans('LaravelLogger::laravel-logger.verbTypes.crawled').' '.Request::fullUrl();
35+
}
3436
}
3537

3638
if (!$description) {

0 commit comments

Comments
 (0)