If a none commercial pilots logs it and student pays for it. It breaks the regulations regarding PPL's and cost sharing of flights. So whoever pays for the flight must log it.
Not sure that's the case. A flight for which a fee is paid for aircraft hire is a private flight for all but airworthiness purposes (Art 130 2(c), 3(c)). There's no requirement for the payment to come from the pilot-in-command.
It's a different matter if the pilot-in-command is paid for acting as such.