In most logbooks there's a column on the far right called 'any other flying' or somesuch.
You can put it in there and make a note in 'comments' for your own information, that you were piloting the a/c (presumably you are in the RHS?)
But legally you were a passenger so you may not count these hours towards any flying total while in training.
Once you've got your PPL its a dufferent matter.
Cusco.