Wallmander\ElasticsearchIndexer\Model\Log::add PHP Method

add() public static method

Add a line to the log.
public static add ( string $message )
$message string
    public static function add($message)
    {
        static::getLoggerInstance()->addError($message);
    }

Usage Example

Exemplo n.º 1
0
 /**
  * Update post index.
  *
  * @param int $postsID
  */
 public function updatePost($postsID, $data)
 {
     try {
         $this->update(['index' => $this->getIndexName(), 'type' => 'post', 'id' => $postsID, 'body' => ['doc' => $data]]);
     } catch (Exception $e) {
         Log::add('Unable to update post ' . $postsID);
     }
 }