You are here

public function StashLogger::log in Backup and Migrate 8.4

Logs with an arbitrary level.

Parameters

mixed $level:

string $message:

array $context:

Return value

null

File

lib/backup_migrate_core/src/Service/StashLogger.php, line 31

Class

StashLogger
Saves log entries to memory to be processed during the current process. This simple service does no clearing or memory management so should not be used for a long-running process.

Namespace

BackupMigrate\Core\Service

Code

public function log($level, $message, array $context = []) {
  $this->logs[] = [
    'level' => $level,
    'message' => $message,
    'context' => $context,
  ];
}