avutil/log: added av_log_format_line2 which returns buffer length