小编Pat*_*and的帖子

如何在TYPO3后端写日志?

我想调试后端,需要写一些日志。我尝试了下面的代码,但是它不起作用,它什么也没写!你能帮助我吗 ?

var $logger;

    public function __construct()
    {
        parent::__construct();
        // desactiver le cache sinoin les FE plugins ne sont pas réactualisé
        // desactivation dans le backend modifie des liens en ajoutant '/no_cache/' devant le lien
        // les liens deviennent inutilisables
        $GLOBALS['TSFE']->set_no_cache();
        $this->logger = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\CMS\Core\Log\LogManager')->getLogger(__CLASS__);
        $this->logger->info('Everything went fine.');
    }
Run Code Online (Sandbox Code Playgroud)

php typo3

2
推荐指数
1
解决办法
2012
查看次数

标签 统计

php ×1

typo3 ×1