Shows how to log in java, which is surprisingly tricky.