This command will randomly select a number between 0 and 1000, then use that number to search for a line in the /var/log/syslog file that contains that number.
awk 'BEGIN { print int(rand()*1000) }' | xargs -I{} grep -e "{}" /var/log/syslog