Elgg\Logger::warn PHP Method

warn() public method

Log message at the WARNING level
public warn ( string $message ) : boolean
$message string The message to log
return boolean
    public function warn($message)
    {
        return $this->log($message, self::WARNING);
    }

Usage Example

Example #1
0
 /**
  * Creates a table {prefix}{$namespace}_lock that is used as a mutex.
  *
  * @param string $namespace Allows having separate locks for separate processes
  * @return bool
  */
 public function lock($namespace)
 {
     $this->assertNamespace($namespace);
     if (!$this->isLocked($namespace)) {
         // Lock it
         $this->db->insertData("CREATE TABLE {$this->db->getTablePrefix()}{$namespace}_lock (id INT)");
         $this->logger->info("Locked mutex for {$namespace}");
         return true;
     }
     $this->logger->warn("Cannot lock mutex for {$namespace}: already locked.");
     return false;
 }
All Usage Examples Of Elgg\Logger::warn