-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export Logging #196
Comments
The template Enterprise_ImportExport_Model_Scheduled_Operation is still existing in enterprise but not community edition. |
same for 1.8.x – http://svn.magentocommerce.com/source/branches/1.8-trunk/app/code/core/Mage/ImportExport/Model/ <--- Scheduled/Operation.php missing |
@svenkraenkel , the team has looked at the issue and could not reproduce it. According to the description provided, the issue could not be reproduced on Magento 2, but is still valid for Magento 1.x. We created the appropriate ticket in the backlog of Magento 1.x. We are closing this issue in scope of Magento 2. |
By activating logging via
protected $_debugMode = true;
I will get the following error:
Tested with Magento 1.7.0.2 but the code in Magento 2 at this part is always the same:
Fatal error: Undefined class constant 'LOG_DIRECTORY' in /var/www/magento-1.7.0.2/app/code/core/Mage/ImportExport/Model/Abstract.php on line 93
by calling
Mage_ImportExport_Model_Scheduled_Operation::LOG_DIRECTORY.
Function in Magento2 (2.0.0.0-dev39):
/**
Log debug data to file.
Log file dir: var/log/import_export/%Y/%m/%d/%time%%operation_type%%entity_type%.log
*
@param mixed $debugData
@return Mage_ImportExport_Model_Abstract
*/
public function addLogComment($debugData)
{
if (is_array($debugData)) {
$this->_logTrace = array_merge($this->_logTrace, $debugData);
} else {
$this->_logTrace[] = $debugData;
}
if (!$this->_debugMode) {
return $this;
}
}
Function in Magento 1.7.0.2 and 1.5:
/**
Log debug data to file.
Log file dir: var/log/import_export/%Y/%m/%d/%time%%operation_type%%entity_type%.log
*
@param mixed $debugData
@return Mage_ImportExport_Model_Abstract
*/
public function addLogComment($debugData)
{
if (is_array($debugData)) {
$this->_logTrace = array_merge($this->_logTrace, $debugData);
} else {
$this->_logTrace[] = $debugData;
}
if (!$this->_debugMode) {
return $this;
}
if (!$this->logInstance) {
$dirName = date('Y' . DS .'m' . DS .'d' . DS);
$fileName = join('', array(
str_replace(':', '-', $this->getRunAt()),
$this->getScheduledOperationId(),
$this->getOperationType(),
$this->getEntity()
));
$dirPath = Mage::getBaseDir('var') . DS . Mage_ImportExport_Model_Scheduled_Operation::LOG_DIRECTORY
. $dirName;
if (!is_dir($dirPath)) {
mkdir($dirPath, 0777, true);
}
$fileName = substr(strstr(Mage_ImportExport_Model_Scheduled_Operation::LOG_DIRECTORY, DS), 1)
. $dirName . $fileName . '.log';
$this->_logInstance = Mage::getModel('core/log_adapter', $fileName)
->setFilterDataKeys($this->_debugReplacePrivateDataKeys);
}
$this->_logInstance->log($debugData);
return $this;
}
Is there an other way existing to set export logging to true outside the template?
The text was updated successfully, but these errors were encountered: