Re: Application name in log record

2022-01-10 Thread Makarov Alexey
Thanks, Mark!I'll keep it on mind. 11.01.2022 12:43, Mark Thomas пишет: On 10/01/2022 13:20, Makarov Alexey wrote: Thank you, but this properties is not work or something wrong. I get "${classloader.webappName}", "${classloader.hostName}", or "${classloader.serviceName}" in catalina.out when

Re: Application name in log record

2022-01-10 Thread Mark Thomas
On 10/01/2022 13:20, Makarov Alexey wrote: Thank you, but this properties is not work or something wrong. I get "${classloader.webappName}", "${classloader.hostName}", or "${classloader.serviceName}" in catalina.out when I try to use this properties. But if I try to use "${catalina.base}" all

Re: Application name in log record

2022-01-10 Thread Makarov Alexey
Thank you, but this properties is not work or something wrong. I get "${classloader.webappName}", "${classloader.hostName}", or "${classloader.serviceName}" in catalina.out when I try to use this properties. But if I try to use "${catalina.base}" all fine (property is translate to

Re: Application name in log record

2022-01-10 Thread Rémy Maucherat
On Mon, Jan 10, 2022 at 11:34 AM Mark Thomas wrote: > > I went to look at the source code and found something I'd completely > forgotten about. Tomcat exposes several properties that you can use in > logging.properties. They are: > > classloader.webappName > classloader.hostName >

Re: Application name in log record

2022-01-10 Thread Mark Thomas
I went to look at the source code and found something I'd completely forgotten about. Tomcat exposes several properties that you can use in logging.properties. They are: classloader.webappName classloader.hostName classloader.serviceName There are several ways you could make use of those.

Re: Application name in log record

2022-01-10 Thread Makarov Alexey
Thank you, Mark! Excuse me, I forgot describe deployment. Formatter implemented as library (log-formatter.jar). I specified classpath to this library in setenv.sh: echo "Setting parameters from $CATALINA_BASE/bin/setenv.sh" echo "___" export

Re: Application name in log record

2022-01-09 Thread Mark Thomas
Use ServletContext.getContextPath()? If you have a more complex deployment you might want to preface it with ServletContext.getVirtualServerName() Mark On 10/01/2022 05:00, Makarov Alexey wrote: Hello! I want to print application name in my log files. As I know, I must implemet custom log