TS-1475: Adding an assertion that buf cannot be null in LogFilter