public function MongoDbWatchdogCommands::sanityCheck in MongoDB 8.2
Run a sanity check on the contents of the logger database in MongoDB.
@usage mongodb:watchdog:sanitycheck Report on the site of the event collections, per size bucket.
The "unused" $options allows Drush to know the command should support the --format option, with the chosen default.
@command mongodb:watchdog:sanitycheck @aliases mdbwsc,mowd-sc
Parameters
array $options: A Drush-magic parameter enabling Drush to choose the output format.
Return value
array An array of collection by document count range. A high number of single document collections is a hint of a problem with the application code using the logger subsystem.
File
- modules/
mongodb_watchdog/ src/ Commands/ MongoDbWatchdogCommands.php, line 52
Class
- MongoDbWatchdogCommands
- Drush 9 commands service for the mongodb_watchdog module.
Namespace
Drupal\mongodb_watchdog\CommandsCode
public function sanityCheck(array $options = [
'format' => 'yaml',
]) : array {
return $this->sanityCheck
->buildCollectionstats();
}