Which log will tell me why my computer shut down?

Solution 1:

It is unusual for a kernel error to shutdown the power, it would either hang with a kernel panic or reboot. It was most likely an hardware issue.

If there was a kernel panic search for "kernel panic" on the logs dir:

grep -r "kernel panic" /var/log

Solution 2:

The relevant files in /var/log are messages, dmesg

issue, command last to see the exact reboot time. You will see a line starting with reboot (or may be shutdown) for all reboot/crash.
cat /var/log/messages from a terminal and check for messages at the time stamp of reboot or just before it. dmesg can give the last boot time messages.

Hope this helps.