Which STM32 is best for logging a CAN network?
The shortest CAN frame is 55 bit times, so in the very worst case situation with a completely saturated bus consisting of one data byte frames (which is not really realistic for a CAN bus with any sort of useful performance) you will be receiving a frame every 220&nbsp;µS (55 / 250000). The cheapest ST microcontroller that has a CAN controller is the STM32F042 ($1), and this has a maximum CPU frequency of 48&nbsp;MHz. So with this device, you would have approximately 10560 (48 * 220) instructions per message in the worst case.

In terms of dealing with the CAN controller and processing CAN messages, this is a considerable amount of processing power - enough to dump the messages into an EEPROM or SD card with a lot of post processing done on them if required. If that is really all your device is doing then I wouldn't worry about it too much and any of the STM32 devices will be fine. If anything, RAM is probably going to be more of an issue if you need to buffer messages, etc.

In practice I doubt the bus is running anywhere near full capacity (though only you know this) and if you can use the hardware filters to ignore a portion of the messages, then you just gain more and more instruction cycles per message.