You can check log_output.closed to check that the "file like" object was closed.

The handler itself has no reference for "close" state since it is a just a driver/adapter for logger to some way of doing output.