Stats_logging: replace len hardcoded content by charsmax