Thruway\Logging\Logger::info PHP Méthode

info() public static méthode

public static info ( null $object = null, $message, array $context = [] ) : null
$object null
$message
$context array
Résultat null
    public static function info($object = null, $message, $context = [])
    {
        static::log($object, LogLevel::INFO, $message, $context);
    }

Usage Example

 /**
  * @param SessionEvent $event
  */
 public function onOpen(SessionEvent $event)
 {
     /* @var $mapping \Voryx\ThruwayBundle\Mapping\URIClassMapping */
     foreach ($event->getResourceMappings() as $name => $mapping) {
         $annotation = $mapping->getAnnotation();
         if (!$annotation instanceof Register) {
             continue;
         }
         $topicStateHandler = $annotation->getTopicStateHandlerFor();
         if (!$topicStateHandler) {
             continue;
         }
         $session = $event->getSession();
         $registration = new \stdClass();
         $registration->handler_uri = $annotation->getName();
         $registration->uri = $annotation->getTopicStateHandlerFor();
         $registration->options = $annotation->getTopicStateHandlerOptions();
         //Register Topic Handlers
         $registration->topic = $topicStateHandler;
         $session->call('add_state_handler', [$registration])->then(function ($res) use($annotation) {
             Logger::info($this, "Registered topic handler RPC: '{$annotation->getName()}'' for topic: '{$annotation->getTopicStateHandlerFor()}'");
         }, function (ErrorMessage $error) use($annotation) {
             Logger::error($this, "Unable to register topic handler RPC: '{$annotation->getName()}'' for topic: '{$annotation->getTopicStateHandlerFor()}'' Error: '{$error->getErrorURI()}''");
         });
     }
 }
All Usage Examples Of Thruway\Logging\Logger::info