The following example logs all printable strings in a telnet packet.
log tcp any any <> any 23 (session:printable;)
Given an FTP data session on port 12345, this example logs the payload bytes in binary form.
log tcp any any <> any 12345 (metadata:service ftp-data; session:binary;)