Encode user input data used in log