You indeed adress a major issue of Tanktastic. Currently there is only one way a battlelogger, combatlogger, whatever you want to call it can be punished and that is by having a Staff member with you in-game. Obviously, Staff members cannot be available at all times which leaves the battlelogger unpunished. With that comes the fact that some people aren't really battlelogging, they just have a crappy internet connection and this is hard to determine whether the person is just lagging out or battle logging. Staff members will most likely have difficulties with this.
But, to get to the actual topic of my reply, I would like to react to some of the given solutions starting with Mr blue sky's one.
Mr blue sky's solution: "add a timer for when someone leaves a room. A notification would display, "Leaving room in T seconds". T would represent the timer counting down from a prescribed amount perhaps 3 seconds".
I have to say this is quite a good solution to make combat logging useless but after some time, new methods will be created to combat log. For example when having a low HP and going into battle, clicking "leave" right before they go in, kill an enemy and leave the room right after. Another advantage of this solution is that people who lag aren't really affected by this, they just lag out without clicking the "leave" button.
FieldMarshal's solution: "attributing the frag to the last player who shot into the logger before he logged"
If you mean with this that the people who hit the combat logger before he logged gets the kill credits and experience, then that doesn't really prevent people from leaving, does it? It just rewards the player wo shot him with extra experience and credits, but the idea might work when the combat logger gets a death extra in his/her score.
Error's solution: "disable the leave button for as long as a player is under attack, and add a timer interval after the attack on, say five seconds. After the specified amount of time, the leave button will be enabled again"
This is my favourite option so far, at least the first option you gave is. Personally I think the second option won't work out to well because some players just want to leave with low level while driving because they have to go for some reason. Although the "leave" button gets enabled in due time again, it just isn't nice if you want to join your friend, want to leave on low HP and can't because there's a timer and when you have left, the friends' room is full. But the first option is very nice tho. There is a somewhat similar system in Battlefield 4 which basically prevents spawning on a squadmember when he or she is under fire. This solution really prevents the combat loggers as they mainly leave when being attacked.
In the end, I think I'd like Error's solution the most as it really takes on the whole combat logging idea. The developers could add some variables to this function, such as a time specification. For example, when a tank is being hit, it would disable the leave button and say "in battle" so combat loggers can't leave when under attack. To add this function to low HP as well would be too much, but that is an option as well. I'lltry to find some examples of this.