public function setEntityManager(EntityManager $entityManager)
	{
		$this->entityManager = $entityManager;
		$this->connection = $entityManager->getConnection();
		$bar = Debugger::getBar();
		$bar->addPanel($this);

		$config = $this->connection->getConfiguration();
		$logger = $config->getSQLLogger();

		if ($logger instanceof Doctrine\DBAL\Logging\LoggerChain) {
			$logger->addLogger($this);
		} else {
			$config->setSQLLogger($this);
		}
	}