Print the last 1000 lines of the syslog file, filter out the lines containing "logind", extract the second field of the output, replace the newline characters with spaces, randomly sort the output and print the first line.
tail -1000 /var/log/syslog | sed -n 's/^.*logind/&/p' | cut -f2 | tr '\n' ' ' | sort -R | head -n1