Skip to content
Snippets Groups Projects
Commit 285d3a4f authored by Conrad Lara's avatar Conrad Lara
Browse files

Issue #3263912 by catch, cmlara: 'Log level OK does not exists' error when using drush command

parent b9f26cf8
Branches
Tags
No related merge requests found
......@@ -10,7 +10,6 @@ use Drupal\s3fs\Batch\S3fsRefreshCacheBatchInterface;
use Drupal\s3fs\S3fsServiceInterface;
use Drush\Commands\DrushCommands;
use Drush\Exceptions\UserAbortException;
use Drush\Log\LogLevel;
/**
* S3FS Drush commands handler.
......@@ -134,7 +133,7 @@ class S3fsCommands extends DrushCommands {
break;
}
$this->logger()->log(LogLevel::OK, new TranslatableMarkup('You are going to copy @scheme scheme(s).', ['@scheme' => $scheme]));
$this->logger()->notice(new TranslatableMarkup('You are going to copy @scheme scheme(s).', ['@scheme' => $scheme]));
$this->logger()->warning(new TranslatableMarkup('You should have read "Copy local files to S3" section in README.txt.'));
$this->logger()->warning(new TranslatableMarkup('This command only is useful if you have or you are going to have enabled s3 for public/private in your setting.php'));
......@@ -154,13 +153,13 @@ class S3fsCommands extends DrushCommands {
}
if ($scheme == 'all' || $scheme == 'public') {
$this->logger()->log(LogLevel::OK, new TranslatableMarkup('Including @scheme scheme', ['@scheme' => 'public']));
$this->logger()->notice(new TranslatableMarkup('Including @scheme scheme', ['@scheme' => 'public']));
$this->s3fsFileMigrationBatch->execute($config, 'public', $uploadOptions);
}
if ($scheme == 'all' || $scheme == 'private') {
if (Settings::get('file_private_path')) {
$this->logger()->log(LogLevel::OK, new TranslatableMarkup('Including @scheme scheme', ['@scheme' => 'private']));
$this->logger()->notice(new TranslatableMarkup('Including @scheme scheme', ['@scheme' => 'private']));
$this->s3fsFileMigrationBatch->execute($config, 'private', $uploadOptions);
}
else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment