The problem is that this toString will produce a big block of code. Lets say it is called Student. If you wanted to log:
Student X linked to student Y because of Z.
Then the X and Y are going to become massive, and the whole line gets split out and unreadable.
You might have a "toFullDescription" or something method that looks like your current toString, but the toString should just have a few meaningful elements, probably just the name and Id inside curly braces.