Home » Php » php – Disable/enable logging in Magento from database

php – Disable/enable logging in Magento from database

Posted by: admin July 12, 2020 Leave a comment

Questions:

I know that to enable logging through admin you can go:
System > Configuration > Advanced > Developer > Log Settings > Enable

But is there any way to enable it through database? As I don’t have access to admin.

How to&Answers:

All settings appearing in System / Configuration are stored in the core_config_data table.

The one you’re searching is dev/log/active.

Be careful, in this table, you can have different values for each stores

Answer:

Change variable values in the file lib/Varien/Db/Adapter/Pdo/Mysql.php to

$_debug               = true;
$_logQueryTime        = 0.05;
$_logAllQueries       = true;
$_logCallStack        = false;
$_debugFile           = 'var/debug/pdo_mysql.log';

This will print out the sql queries