Hi Chris, -----Ursprüngliche Nachricht----- Von: Christopher Schultz [mailto:ch...@christopherschultz.net] Gesendet: Mittwoch, 20. Februar 2019 16:41 An: users@tomcat.apache.org Betreff: Re: Logging web applications with log4j 1.2
> > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA256 > > > > Thomas, > > > > On 2/20/19 08:00, Thomas Rohde wrote: > > > I've some basic questions regarding the usage of log4j 1.2 in Tomcat > > > 8.5. > > > > > > We are running more than one web application in Tomcat. Each > > > application uses log4j via slf4j and ships the log4j.jar in > > WEB-INF/lib. The Tomcat itself uses JULI. > > > > We are using a common log4j.xml file for configuration. > > > > The file path is set as system property in CATALINA_OPTS as > > follows: -Dlog4j.configuration=/path/to/file/log4j.xml > > > > 1. Is this a valid setup or are there any side effects in > > initialization log4j by the different WebAppClassLoaders? > > You are not using classpath-based config-file-loading, so it should not be a > problem[*]. > > > 2. We are observing weird things in rolling the files hourly. The > > timestamp of the log messages doesn't fit to the timestamp suffix of > > the file. Why does this happen? > > Possibly conflicting time zones, somewhere? Because log4j.jar is in each > application's class loader, they CAN have different in-memory configurations. No there are no different time zones in use. > > [*] While this will work, why would you ever want multiple applications to > have their logging configuration all tied together? > Why not separate the logging configuration into one config-per web > application? OR are you trying to unify all logging into the same file(s )? Yes I would like to do that, but I'm not sure how to achieve it without putting the log4j.xml into the WAR file. Do you have any hint? > > - -chris > -----BEGIN PGP SIGNATURE----- > Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/ > > iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlxtdSUACgkQHPApP6U8 > pFhxow//T+5ALVYJcljqLxykHND7ZSy9NHf0+a+jnWzlDO5S6oO+bxjso9raJZYC > jUG4nhBwuAtD5MWyS04t0UedYUBP+n1iw4aAGs7PrhFgPxLiHZpMOTBBaeDSYgny > bI+7GuqOhkiauPA8Jb6guE8SkrT18d9X+k7xzy6puYgqbTws0iwk2yEmSV+KNtXy > 0EsVC20KGhU9pCdD7MLSpYX8PaM8sctazxSSVMygL9Ed03WKkJ6BRPavq4ao1uGg > V0ZlTQb7f9PRPOXOQzoAlsaWNTCVRKQES82/HHJE/uJG5tg7jnQ5Syjs53FyfVwH > 0AtfNpJiOI4LES5ejR7E5JZ8Lx0/J41XwsPO5hOmYaiHHs35EFtozCETNNwjYxcb > 245z++YsBw0bnBDRpAFi5Kq5UL8ludo0CqDTfKQSIqrMoNHoiULm4U3niGl2P01w > O8k2KrwqtYWu77esh+TpJpXTTaLnEhCc+YWFGWnER3w8WAOHitvjbmAi21gL3NIG > 3PJEFEdrNMaoI2h3SkK+DJzuVVJRmXRMV2wduX4+3qGW6l31Jo3ihFiDDdXyGB+b > jtpU1JHYfYP+ck8mEXgOvI6RXZEG7R8Ef7ectYuKdhRRpE+S9wx1llZminsxY/fr > 0apA+L6paBo9R7EGxJVt237wx/L+tRnfF5raLZoAJrkks7SkWgE= > =sjai > -----END PGP SIGNATURE----- > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org