Re: log4j initialization does not seem to happen when Tomcat service is started

2024-03-31 Thread Piers Uso Walter
Hi Piotr, Thanks for the reminder. I did in fact do this, it had already been included in Thad’s solution. The idea of my email was to describe changes I made to Thad’s code. I now realize that it would have been smarter (and more useful to future mailing list readers) if I had included the

Re: log4j initialization does not seem to happen when Tomcat service is started

2024-03-31 Thread Piotr P. Karwasz
Hi Piers, On Sun, 31 Mar 2024 at 22:37, Piers Uso Walter wrote: > > Thad, > > > Thanks so much. This looks exactly what I want to do. > But somehow I never got your code to work. > > ... > > I made these changes to your code: > > 1. > LogListener is now a subclass of Log4jServletContextListener,

Re: log4j initialization does not seem to happen when Tomcat service is started

2024-03-31 Thread Piotr P. Karwasz
Hi Piers, On Wed, 20 Mar 2024 at 17:09, Piers Uso Walter wrote: > Am I trying something unusual here when I attempt to make the app decide > where the log4j configuration file is located? > Is there any other way in which I can achieve this? > Is there an API for this? Sorry for the late

Re: log4j initialization does not seem to happen when Tomcat service is started

2024-03-31 Thread Piers Uso Walter
Hi Jeff, Thanks for your suggestion. I ended up doing it slightly different (see my response to Thad Humphries). However, I’ll keep your idea in mind because the ability to both include a standard configuration in the app and also optionally modifying this configuration via an external config

Re: log4j initialization does not seem to happen when Tomcat service is started

2024-03-31 Thread Piers Uso Walter
Thad, Thanks so much. This looks exactly what I want to do. But somehow I never got your code to work. I finally modified your approach a bit, and now it works for me. I am now able to dynamically set the location of the log4j configuration file in my app. And this works not just when the app