How can I log to file all packet traffic coming from a wss web socket on port 1234 using stunnel, openssl and tcpdump ?

I have already seen https://gist.github.com/jeremiahsnapp/6426298#file-stunnel-mitm-proxy-conf , but I would like to know how to configure it