For clarity's sake, "combat logging" is when a Commander ungracefully exits the game (e.g. using ALT + F4 then shutting down the game process) to avoid defeat, destruction and damage. Commanders might use this exploit the moment they are interdicted or the moment before they are about to be destroyed.
Combat Logging is the act of logging off or exiting a session of Elite Dangerous during ship-to-ship combat, either PvE or PvP, in an illegitimate way in order to prevent an undesirable update to player save data. Combat logging is most often done to avoid death during combat due to insurance costs, but it is also used to avoid incurring fines and bounties during activities such as smuggling, and to avoid losing valuable or difficult to obtain commodities. This exploit works because the game only saves player data when certain events occur, not continuously, and the player can interrupt the game before it saves by terminating the application or network connection. Players who witness or suspect combat logging can report the individual to Frontier Developments for review.
To clarify: the official stance on exiting the game via the menu, at any point, is that it is legitimate. I suspect at some point we may increase the "in danger" countdown, but for now you just have to wait fifteen seconds. However, we can't speak for how other Commanders view such actions. For the record, when we talk about "combat logging" at Frontier, we mean the act of ungracefully exiting the game (either by ALT-F4 type procedures or by cutting the network traffic).
— Sandro Sammarco, May 17, 2016
Frontier Developments' official stance on combat logging by terminating the game application or the network connection is that it is an "undesirable exploit" that is "not part of the game", and therefore an offense that may be punished with a ban.
Exiting the game via the menu and waiting for the 15-second cooldown to elapse is always legitimate, and will not incur any penalty.