Ralph, I implemented what you suggested. Feel free to suggest improvements. https://github.com/apache/logging-log4j2/pull/469
Tim On Tue, Feb 23, 2021 at 2:14 PM Ralph Goers <ralph.go...@dslextreme.com> wrote: > I would suggest that if it is writing to something other than System.out > that it be redirected back there and then the OutputStream be closed. > However, I’ve not looked at the code recently so I am not sure what it > takes to do that. > > Ralph > > > On Feb 23, 2021, at 2:22 PM, Tim Perry <tim.v...@gmail.com> wrote: > > > > Thank you, Volkan. > > > > I'm not quite ready to submit a PR. I was hoping some of you with more > > knowledge of log4j-core would weigh in on what we should do about > shutting > > down the StatusLogger. > > > > My thought is we choose one of two options: > > > > Option A: > > 1) check if any StatusLogger is writing to standard out or standard > error. > > If not, add one. > > 2) stop any loggers that don't write to standard out or standard error. > > > > Option B: > > 1) stop any loggers that don't write to standard out or standard error. > > > > Option A could cause the log messages to be split across two > destinations, > > but they all get sent somewhere. Option B could lose shutdown messages > when > > writing to a file, but by that point it may not matter. > > > > If any of you have a better idea, I'm happy to implement it. If nobody > > weighs in on the best option, I'll probably submit Option A as a pull > > request on Friday or Saturday. > > > > Tim > > > > >