what i am trying to achieve is for a plugin to get if the player quits by client disconnect or by timeout, is that possible?
Why not try dumping getQuitMessage() in your tests and see the values so that you can just check if the values match the ones in your tests?
Then I don't think you can. But also think about PlayerKickEvent. I don't think it helps, but you can still try.
He is asking about with a plugin... Uhh well, you could do that using the OB family of functions (like ob_start()), but not sure if it is even present in PocketMine extensions.
AFIK, you can fopen("server.log","w") ... etc... from a plugin. It is not as real time but it is no different from checking the server.log from another program.
No, that is not good because it will fight for resources with the server. Better do addAttachment() on MainLogger.