Deuteronomy 23:12-14

23:12 You are to have a place outside the camp to serve as a latrine. 23:13 You must have a spade among your other equipment and when you relieve yourself outside you must dig a hole with the spade and then turn and cover your excrement. 23:14 For the Lord your God walks about in the middle of your camp to deliver you and defeat your enemies for you. Therefore your camp should be holy, so that he does not see anything indecent among you and turn away from you.