Skip to content
Permalink
Browse files

Make output a bit less noisy

  • Loading branch information...
flack committed Oct 16, 2019
1 parent 139edb2 commit 3490f3ced4f7a4a577f62bb89598503e02f246f9
Showing with 6 additions and 2 deletions.
  1. +6 −2 src/midcom/console/command/blobdircleanup.php
@@ -99,7 +99,9 @@ private function cleanup_corrupted(OutputInterface $output, array $files)
if ($att = $this->get_attachment($file)) {
if (!$this->dry) {
$stat = $att->purge();
$output->writeln(($stat) ? "<info>Purge OK</info>" : "<comment>Purge FAILED, reason: " . \midcom_connection::get_error_string() . "</comment>");
if (!$stat || $output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE) {
$output->writeln(($stat) ? "<info>Purge OK</info>" : "<comment>Purge FAILED, reason: " . \midcom_connection::get_error_string() . "</comment>");
}
}
}
}
@@ -109,7 +111,9 @@ private function cleanup_file(OutputInterface $output, string $file)
{
if (!$this->dry) {
$stat = unlink($file);
$output->writeln(($stat) ? "<info>Cleanup OK</info>" : "<comment>Cleanup FAILED</comment>");
if (!$stat || $output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE) {
$output->writeln(($stat) ? "<info>Cleanup OK</info>" : "<comment>Cleanup FAILED</comment>");
}
}
}

0 comments on commit 3490f3c

Please sign in to comment.
You can’t perform that action at this time.