Fix buffer and log level validation.