Re: How to have ThreadContext be pre-populated?

Matt Sicker <[email protected]>
Newsgroups gmane.comp.jakarta.log4j.user
Message-ID <CACmp6krKTT-qOqxQn89CLsZ4mTDBnGEe2QacHQZ27wgLmXUwCQ@mail.gmail.com>
That's the general purpose of the ContextDataProvider extension API.
See https://logging.apache.org/log4j/2.x/manual/extending.html#ContextDataProvider
for basic details.

On Fri, Mar 4, 2022 at 8:31 AM Gary Gregory <[email protected]> wrote:
>
> An example would help...
>
> Gary
>
> On Fri, Mar 4, 2022 at 8:52 AM Morten Sabroe Mortensen <
> [email protected]> wrote:
>
> > I miss a handler or a mechanism to have ThreadContext be pre-populated.
> >
> > Does anything exist which is called once per thread -- and without explicit
> > invocation by my program, of course -- ?
> >
> > The values I want to pre-populate with are non-trivial and need to be read
> > by code; they are not constants.
> >
> > --
> > Med venlig hilsen
> > Morten Sabroe Mortensen
> >
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.