Enable error and exception log

Magento 1: enable error and exception log

Yesterday, I suddenly met an issue with sessionย so I could not login to magento backend.

A best practice is toย enable magento log to see what happened. The only way I could do is to enable it via database query. This post is to noteย and to save you guys time when facing the same problem.

INSERT INTO `core_config_data` (`config_id`, `scope`, `scope_id`, `path`, `value`) VALUES
('', 'default', 0, 'dev/log/active', '1'),
('', 'default', 0, 'dev/log/file', 'system.log'),
('', 'default', 0, 'dev/log/exception_file', 'exception.log');