Skip to content

Instantly share code, notes, and snippets.

@jpgreth
Forked from mficzel/gist:6622101
Created October 17, 2013 14:49
Show Gist options
  • Select an option

  • Save jpgreth/7026285 to your computer and use it in GitHub Desktop.

Select an option

Save jpgreth/7026285 to your computer and use it in GitHub Desktop.
//create logger
$this->logger = \TYPO3\Flow\Log\LoggerFactory::create('myLoggerName', 'TYPO3\Flow\Log\Logger', '\TYPO3\Flow\Log\Backend\FileBackend', array(
'logFileURL' => FLOW_PATH_DATA . 'Logs/myLoggerName.log',
'createParentDirectories' => TRUE,
'severityThreshold' => LOG_INFO,
'maximumLogFileSize' => 10485760,
'logFilesToKeep' => 1,
'logIpAddress' => TRUE
));
//use logger
$this->logger->log('message', LOG_INFO, array('foo','bar'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment