Traditionally, messages from the X Window System are stored in /var/log/Xorg.0.log. Newer distributions now store these messages in the systemd journal. Under such systems, the Xorg entries can be viewed with the following command:
# journalctl -e _COMM=Xorg.bin