Check input for Log length

Check input for Log length to make sure the input is a nonnegative
integer.

Change-Id: Iae3dbf4236f1c7ceb8260540dd4f9086349bc13a
Closes-bug: 1331624
Merge "Check input for Log length"