You can log any hours you do in any reg aircraft as long as you legal to fly on the that particular reg.
The rules and law on what you can do flying that reg is a completely seperate issue.
Many of us have several hundreds hours flying all manner of registrations IFR, night, PIC, internationally but to do so we need to insure that we are legal to be flying that reg intially and then if we are legal in that particular countries airspace.
The logging you just log what you have done. Some of the hours may not be valid for use towards currency or later license issue but you can still log them.