8

In Magento how do I enable exception.log and system.log at the database level?

I know I can do it through admin backend (which I do not want to do).

What value needs to be changed? I assumed that dev/log/active needed to be set to 1 in core_config_data, but I did this and that did not enable logging. Thanks!

3 Answers3

11

Your solution is right. That's the right place to enable it in the DB. If it's not working for you, try clearing the cache. If still not working, try select * from core_config_data where path = "dev/log/active"; and check if it is not disabled for a particular scope that's overriding your setting

barbazul
  • 608
  • 6
  • 8
  • 2
    And if it's still not working, check that the user running the shell script has write permission to var/log. – kojiro Mar 06 '14 at 00:47
3

Use following query

INSERT INTO `yourmagentodbname`.`core_config_data` (`scope`, `scope_id`, `path`, `value`) VALUES ( 'default', '0', 'dev/log/active', '1');
Mukesh
  • 7,630
  • 21
  • 105
  • 159
0

Check folder permissions. You need to give permissions for the user that is running apache.

In my case just the sub directory "log" was not owned by the running apache user.

My apache user is bitnami:daemon...

So for me the solution was:

sudo chmod -R 777 var/
sudo chown -R bitnami:daemon var/