logger: removed unnecessary boundary checks and limited string parts so they always respect buffer lengths

improved logger tests

(0) -100 -30 -10 -2 +2 +10 +30 +100 +300 tip

mercurial