Things I have tried so far have been rebooting into safe mode and formatting my phone with the stock Android 4.4.2 image. Both of these things have not worked out.
I'm trying to determine if I need a new phone if there is something else. Is there anything that would be indicated by a crash log and if so, how would I access that log.
I was recently on vacation taking a "Photo Sphere" with my Nexus 4 and suddenly my phone just turned off. It didn't power down, it just suddenly was off. I felt the back of my phone and it was particularly hot right in the center of the phone. Since that event, my phone is highly unreliable when unplugged and will continue to immediately turn off when I either try to use the phone's camera, or sometimes: try to make a phone call, watch a video, and other random things. After the phone has powered off, it gets stuck in a reboot loop. The phone is bootable and works reliably when it is plugged in. When I am able to successfully reboot the phone, when plugged in, I can see that the battery has plenty of charge remaining. The phone will work for hours or minutes after it has been unplugged as long as I am doing very little with it.