Re: Web application name.

Ralph Goers <[email protected]>
Newsgroups gmane.comp.jakarta.log4j.user
Message-ID <[email protected]>
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ı <[email protected]> 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 <[email protected]>
> wrote:
> 
>> Hello guys.
>> How can I log my web application name?
>>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.