Formatting locked out admin log string and getting IP address correctly using get_ip().