2017-10-18 1 views
0

Symfony 명령 (bin/console)을 실행할 때 Redis 로그가 출력됩니다. 예를 들어명령 실행 중 Redis 로그를 비활성화하는 방법

:

이 읽기 ​​명령의 실제 출력 어렵게
$ bin/console doctrine:generate:entities AppBundle:Item 

[2017-10-18 13:26:47] cache.WARNING: Failed to save key "{key}" ({type}) {"key":"%5BAppBundle%5CEntity%5CItem%40%5BAnnot%5D%5D%5B1%5D","type":"array","exception":null} 
[2017-10-18 13:26:47] cache.WARNING: Failed to save key "{key}" ({type}) {"key":"%5B%5BC%5DAppBundle%5CEntity%5CItem%24property_1%40%5BAnnot%5D%5D%5B1%5D","type":"integer","exception":null} 
[2017-10-18 13:26:47] cache.WARNING: Failed to save key "{key}" ({type}){"key":"%5B%5BC%5DAppBundle%5CEntity%5CItem%24property_2%40%5BAnnot%5D%5D%5B1%5D","type":"integer","exception":null} 
Generating entity "AppBundle\Entity\Item" 
[2017-10-18 13:26:47] cache.WARNING: Failed to save key "{key}" ({type}) {"key":"%5B%5BC%5DAppBundle%5CEntity%5CItem%24property_3%40%5BAnnot%5D%5D%5B1%5D","type":"integer","exception":null} 
... and at least 100 more 

> backing up Item.php to Item.php~ 
> generating AppBundle\Entity\Item 

.

답변

1

snc_redis.phpredis.default/Snc\RedisBundle\Client\Phpredis\Client 서비스는 원래 \Redis 클래스의 래퍼이며 로깅을 추가합니다.

구성 인스턴스에 대한 로깅을 해제하거나 Redis 클래스를 직접 사용할 수 있습니다.

로깅은 일반적으로 "% kernel.debug %"로 설정되어 있으므로 env = prod에 로그인하지 않아야합니다. 당신이 sncRedis를 사용하지 않는 경우

snc_redis: 
    clients: 
     default: 
      type: predis 
      alias: default 
      dsn: redis://localhost 
      # usually "%kernel.debug%" to enable in dev 
      logging: false 

, 우리는 당신을 도울 수 있도록 사용중인 메커니즘의 더 많은 정보를 필요 했어.