=== How does this work?

Data used for logging should be content-restricted and typed. This can be done by validating the data content or sanitizing it. +
Validation and sanitization mainly revolve around preventing carriage return (CR) and line feed (LF) characters. However, further actions could be required based on the application context and the logged data usage.