Issue

It seems like the logger string replacement needs an update:

If you upload a Solr Cloud configset with Drush, the Server ID variable is missing, and output as %server_id:

$ ddev drush --numShards=1 search-api-solr:upload-configset solr_server
 [success] Solr configset for %server_id uploaded.

Originally reported in #3370571: Update README wording for SEARCH_API_SERVER_ID, where @mkalkbrenner observed that:

[...] we leverage the search_api logger. I quickly checked the search_api code and the string replacement there is the same.

.

Remaining tasks

Update the logger string replacement.

Comments

ressa created an issue. See original summary.

drunken monkey’s picture

Component: General code » Drush / Rules
Status: Active » Needs review
StatusFileSize
new5.88 KB

Ah, I see what you mean: our Drush commands output hardly any information, because they use log level “info” which Drush doesn’t display by default. However, for compatibility reasons, we also cannot just use the “success” log level (which would probably be appropriate in most places). We probably need to switch based on the concrete logger implementation.

Please see/test/review the attached patch.
And thanks for reporting this problem!

drunken monkey’s picture

Could you please give the patch a try?

ressa’s picture

Sure, but I am not sure how to check if it makes any difference in Search API ... How can I check that?

I do still get the Solr error, where it shows "Solr configset for %server_id uploaded", it looks like from this file in the Search API Solr module:

search_api_solr/modules/search_api_solr_admin/src/Commands/SearchApiSolrAdminCommands.php

I think I misunderstood @mkalkbrenner, perhaps an identical issue for Search API Solr should be created for the Solr %server_id issue? (I closed #3370571: Update README wording for SEARCH_API_SERVER_ID, since it was about updating the README).

  • drunken monkey committed 62e3d75b on 8.x-1.x
    Issue #3370934 by drunken monkey: Fixed missing log messages in Drush.
    
drunken monkey’s picture

OK, I now see the problem, and created #3394168: Fix variable substitution in Drush log messages in the Solr module queue with the actual problem description and fix.
Still committed the patch above, since it seems to be helpful regardless.

ressa’s picture

Thanks for fixing the Solr logger string problem in the other issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.