public function log($text, $userId = '', $attributes = [])
    {
        $logText = $text;
        $logText .= ($userId != '' ? ' (by user_id '.$userId.')' : '');
        $logText .= (count($attributes)) ? PHP_EOL.print_r($attributes, true) : '';

        Log::info($logText);

        return true;
    }
public function log($text, $userId = '', $attributes = [])
    {
        $logText = $text;
        $logText .= ($userId != '' ? ' (by user_id '.$userId.')' : '');
        $logText .= (count($attributes)) ? PHP_EOL.print_r($attributes, true) : '';

        Log::info($logText);

        return true;
    }
public function log ( $ text , $ userId = '' , $ attributes = [ ] ) { $ logText = $ text ; $ logText .= ( $ userId != '' ? ' (by user_id ' . $ userId . ')' : '' ) ; $ logText .= ( count ( $ attributes ) ) ? PHP_EOL . print_r ( $ attributes , true ) : '' ; Log :: info ( $ logText ) ; return true ; }
Log activity in Laravels log handler.

@param string $text
@param $userId
@param array  $attributes

@return bool
Log activity in Laravels log handler .