Oh, and see also the docs written in this section:
https://logging.apache.org/log4j/2.x/manual/configuration.html#SystemProperties

On Thu, 12 Mar 2020 at 15:57, Matt Sicker <[email protected]> wrote:
>
> Whoops, typo there. The normalized form is log4j2.fooBarBaz. Note the
> dot after the 2.
>
> On Thu, 12 Mar 2020 at 15:56, Matt Sicker <[email protected]> wrote:
> >
> > They all get normalized into camelCasePropertyNames without the
> > leading log4j, log4j2, or even org.apache.logging.log4j, or Log4j, or
> > really tons of other combinations. See
> > https://github.com/apache/logging-log4j2/blob/master/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java#L420
> > for the source code.
> >
> > I'd suggest using the normalized form which is log4j2fooBarBaz without
> > any dots, dashes, or other special characters (most of which are used
> > as tokens to split words and subsequently ignored anyways).
> >
> > On Thu, 12 Mar 2020 at 15:52, Volkan Yazıcı <[email protected]> wrote:
> > >
> > > Hello,
> > >
> > > I see there are multiple property prefix conventions in the sources,
> > > e.g., `log4j2.enable.threadlocals` and `log4j.maxReusableMsgSize`. In
> > > JsonTemplateLayout, builder defaults are initialized via properties
> > > too[1]. There shall I stick to `log4j`, `log4j2`, or even `log4j3`
> > > property prefix?
> > >
> > > Kinds regards.
> > >
> > > [1] 
> > > https://github.com/vy/log4j2/blob/json-template-layout/log4j-layout-json-template/src/main/java/org/apache/logging/log4j/layout/json/template/JsonTemplateLayoutDefaults.java
> >
> >
> >
> > --
> > Matt Sicker <[email protected]>
>
>
>
> --
> Matt Sicker <[email protected]>



-- 
Matt Sicker <[email protected]>

Reply via email to