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');