This is a problematic question. Frequently the name of the web application is considered to be the name of the War file it exists in. AFAIK there is no way to get that. The data in the servlet context may, or may not, represent the application name.
A spring boot application on the other hand, gets its name from the value of the spring.application.name property. The answer to this question really depends on what you consider to be the web application name and where it comes from. Ralph > On Nov 23, 2021, at 12:13 PM, Volkan Yazıcı <vol...@yazi.ci> wrote: > > Would web:servletContextName lookup > <https://logging.apache.org/log4j/2.x/manual/lookups.html#WebLookup> work > for you? > > On Tue, Nov 23, 2021 at 3:46 PM vahid ghasemi <vahidghasemi...@gmail.com> > wrote: > >> Hello guys. >> How can I log my web application name? >> --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org