return an empty list when called with maxLines = 0 added unit test for getLog(0) returning an empty list (cherry picked from commit 75f58103)