In a double boiler set over simmering water, melt the chocolate and cocoa powder along with the butter. Remove from the heat, stir, and transfer the mix to a large heatproof bowl. Add the sugar and vanilla and combine with a spatula in a circular motion. Slowly add the egg yolks, one by one, mixing very well after each addition. Fold in the broken cookie chunks. If adding pecans, fold them all in as well. You will have a moist and chunky, rough looking mix.
Cut 2 pieces of waxed or parchment paper of about 15" length. Spoon half of the mixture onto each piece of paper. Shape them into logs with your hands and roll them in the paper to give them a salami shape of about 2" thickness. Having the paper cover makes it easy to give them a quick roll to give them a round shape. To finish, twist the ends of the paper in opposite directions.
Wrap each one in a layer of plastic wrap. Place them in the freezer for about 2 or 3 hours or until frozen.
If you wish, roll each log in confectioners’ sugar before slicing to make the slices resemble salami. Slice them as thin or thick as you like, while frozen, and serve.
Chocolate salami will keep in the freezer, tightly wrapped, for about 6 months. Remove from the freezer about 10 minutes before you want to slice it.
If you want to give them as gifts, you may want to buy colored paper to give them a festive feel. Though, I also like to use brown unbleached parchment paper - it gives them a deli style. In any case, if you traveled with them for a while, don't forget to tell your friends to place the chocolate salamis in the freezer or refrigerator as soon as you give it to them(!).