Reputation: 3
How to get an exit application log of jFrame in log4j when i have set
setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
Upvotes: 0
Views: 45
Reputation:
You should add a ShutdownHook
to the main()
method. Then you can do whatever you want inside the hook, including logging before the application closes.
Upvotes: 1