Re: Is there a way to develop my own resolver for JSON template layout?

Volkan Yazıcı <[email protected]>
Newsgroups gmane.comp.jakarta.log4j.user
Message-ID <CAP7pH7tKsGZ1Vm8NB68FP+h=vbTyn3VBR7DqTe3XZ-E5AVBE+A@mail.gmail.com>
This is the first time I have ever heard about SkyWalking, hence apologies
in advance if I am about to say something nonsense. In the link you have
shared, I see that you use the `%traceId` directive in your PatternLayout
configuration. Is that a simple Lookup implementation, e.g., extending from
StrLookup? If so, why not simply use that Lookup in JsonTemplateLayout
<https://logging.apache.org/log4j/2.x/manual/json-template-layout.html#faq-lookups>
too?

On Sat, Sep 18, 2021 at 10:26 AM jingguo yao <[email protected]> wrote:

> Volkan, I am thinking of the integration of Log4j2 JSON template layout
> with SkyWalking. SkyWalking has done the integration with Log4j2 for the
> pattern layout:
>
> https://github.com/apache/skywalking-java/blob/main/docs/en/setup/service-agent/java-agent/Application-toolkit-log4j-2.x.md
> .
> With the resolver extending supported, it can be easily done.
>
>
>
> On Fri, Sep 17, 2021 at 3:26 PM Volkan Yazıcı <[email protected]>
> wrote:
>
> > Jingguo, I am curious, what kind of a new resolver do you want to
> develop?
> > If that is something useful for other users, it is good to ship that in
> > Log4j by default.
> >
> > On Mon, Sep 6, 2021 at 8:03 AM jingguo yao <[email protected]> wrote:
> >
> > >
> > >
> >
> https://logging.apache.org/log4j/2.x/manual/json-template-layout.html#map-resolver-template
> > > lists all the supported resolvers. I want to develop a new resolver. Is
> > > there a way to do this?
> > >
> > > --
> > > Jingguo
> > >
> >
>
>
> --
> Jingguo
>
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.