Closed laur89 closed 1 year ago
If you'd prepare to keep effective config as-is (ie console only) and make file-logging opt-in via sys config, leave a note.
Not sure about this feature 🤔 why do you want to introduce aync logging in an already high asynchronous app.
Also, you've removed the shutdownhook config in log4j file but i'm still managing the logger shutdown from code. That would cause issue
Also, you've removed the shutdownhook config
why do you want to introduce aync logging in an already high asynchronous app
I titled the PR bit wrong - main bit is adding file logging.
Actually there is already a wiki for that https://github.com/anthonyraymond/joal/wiki/Redirect-log-to-file It keeps the shutdown hook as is. it's important to keep that this way to prevent log loss on shut down.
Note my change doesn't modify the hook either. But considering the wiki it's ok to close the PR
Woops i've missread the code 😄 indead the hook was still here.
I wouldn't squash these 2 commits, as they demonstrate two separate ways of making log4j2 logging async.