Damage Logs

Hello, I just made an account here seeing that you guys seem to have a lot of experienced lua coders working with Gmod. I was hoping I could get some info on how I would go about creating a damage log. I want to create it for the jailbreak gamemode and have it similar to the damagelog in TTT. If this already exists, I apologize.
Fair warning, I am very new to lua so the simpler the explanation the better.

Ok, so this is my first attempt at a script. Trying to get it so that when you do “print_damagelog” in console is prints all damage that round. Including attacker, victim, and damage.


damagelog1 = ""
 function GM:PlayerHurt( victim, attacker, healthleft, healthtaken )
	 damagelog1 = damagelog1 .. victim:GetName() .. " was attacked by " .. attacker:GetName() .. " for " .. tostring(healthtaken) .. " damage.
"
	end
function printthelog (damagelog1)
player:PrintMessage( HUD_PRINTCONSOLE, damagelog1)
end
concommand.Add( "print_damagelog", printthelog )

I’m lost on the PrintMessage syntax. How would I go about printing it into the console of the player that typed in the console command?
If you see any other errors feel free to let me know, and be aware that I am very new to lua.