If you encouraged Logan to go to the bandits camp, you cannot get any hearts with him. If you discouraged him you still can potentially get hearts at that point.
If you went after Logan when the werewolf first attacked Bareshade, you can get hearts with Logan.
If you went after Bernard when the werewolf attacked Bareshade, you cannot get hearts with Logan.
SO, if you discouraged Logan from going to the bandits camp and went after Logan instead of Bernard when the werewolf attacked Bareshade you are fine!
If you did not do both those things, nothing you can do will get you hearts with Logan.
Logan does not care if you have hearts with Bernard as long as you told Logan not to go too the bandits camp and went after Logan when the werewolf attacked.
Bernard does not care if you have hearts with Logan either. You can progress with both of them.