Yes, you can do this with AspectJ by adding a boolean switch to the system and evaluating it with if()
pointcuts.
Java : Logging on demand on production
-
03-06-2022 - |
سؤال
I am working on a legacy software developed in swing and core java. I wanted to add a logging feature in the system where
- If something goes wrong in production system admin can enable logging without shutting down/restarting application.
- Admin will redo the steps to create logs.
- Once bug is reproduced admin can disable the logging and can upload logs to support site.
I am thinking of using AspectJ and I also wanted to collect logs only for a particular section of application.
Any help is highly appreciated.
Regards, -Deepak
المحلول
لا تنتمي إلى StackOverflow