log pattern - servlet context name with fallback on pid
Clément Guillaume <[email protected]>
| Newsgroups | gmane.comp.jakarta.log4j.user |
|---|---|
| Message-ID | <CAJKZH7BzmavXx+LkDL_Z9xbQGr6Msw=uDC5rhPQvBNqezFdXBg@mail.gmail.com> |
Hello,
I'm trying to make a log pattern showing the servlet context name or, if
missing, showing the process id.
${web:servletContextName} %msg
works well for servlet context name alone.
%pid %msg
works well for process id alone.
${web:servletContextName:-${sys:user.name}} %msg
works well for servlet context name with fallback to username system
property ,
${web:servletContextName:-%pid} %msg
does work for servlet context name with fallback to process id.
Am I missing something in my pattern?
Thank you