GCP logging

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

GCP logging

Francesco Chicchiriccò
Hi there,
I would like to configure / extend org.apache.logging.log4j.core.layout.JsonLayout to produce JSON strings compliant with [1], for GCP.

I have found that Spring Cloud provides something like this, but based on logback [2]: if I am not mistaking, the most relevant class there is [3].

Do you have any suggestion about how to proceed?

TIA
Regards.

[1] https://cloud.google.com/logging/docs/agent/configuration#process-payload
[2] https://github.com/spring-cloud/spring-cloud-gcp/tree/master/spring-cloud-gcp-logging
[3] https://github.com/spring-cloud/spring-cloud-gcp/blob/master/spring-cloud-gcp-logging/src/main/java/org/springframework/cloud/gcp/logging/StackdriverJsonLayout.java


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: GCP logging

Ralph Goers
At first glance I would think that just as we have a GELF Layout we would want a separate StackdriverJsonLayout rather than trying to force it into the generic JsonLayout.

I should also point out that the author of the LogstashLayout [1] is pursuing contributing it to Log4j 2, which seems like a viable alternative to JsonLayout.

[1] https://github.com/vy/log4j2-logstash-layout <https://github.com/vy/log4j2-logstash-layout>

Ralph

> On Jan 24, 2020, at 8:27 AM, Francesco Chicchiriccò <[hidden email]> wrote:
>
> Hi there,
> I would like to configure / extend org.apache.logging.log4j.core.layout.JsonLayout to produce JSON strings compliant with [1], for GCP.
>
> I have found that Spring Cloud provides something like this, but based on logback [2]: if I am not mistaking, the most relevant class there is [3].
>
> Do you have any suggestion about how to proceed?
>
> TIA
> Regards.
>
> [1] https://cloud.google.com/logging/docs/agent/configuration#process-payload
> [2] https://github.com/spring-cloud/spring-cloud-gcp/tree/master/spring-cloud-gcp-logging
> [3] https://github.com/spring-cloud/spring-cloud-gcp/blob/master/spring-cloud-gcp-logging/src/main/java/org/springframework/cloud/gcp/logging/StackdriverJsonLayout.java
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

Reply | Threaded
Open this post in threaded view
|

Re: GCP logging

Francesco Chicchiriccò
Thanks Ralph, log4j2-logstash-layout looks great, I'll give it a try.
Regards.

On 2020/01/24 16:10:39, Ralph Goers <[hidden email]> wrote:

> At first glance I would think that just as we have a GELF Layout we would want a separate StackdriverJsonLayout rather than trying to force it into the generic JsonLayout.
>
> I should also point out that the author of the LogstashLayout [1] is pursuing contributing it to Log4j 2, which seems like a viable alternative to JsonLayout.
>
> [1] https://github.com/vy/log4j2-logstash-layout <https://github.com/vy/log4j2-logstash-layout>
>
> Ralph
>
> > On Jan 24, 2020, at 8:27 AM, Francesco Chicchiriccò <[hidden email]> wrote:
> >
> > Hi there,
> > I would like to configure / extend org.apache.logging.log4j.core.layout.JsonLayout to produce JSON strings compliant with [1], for GCP.
> >
> > I have found that Spring Cloud provides something like this, but based on logback [2]: if I am not mistaking, the most relevant class there is [3].
> >
> > Do you have any suggestion about how to proceed?
> >
> > TIA
> > Regards.
> >
> > [1] https://cloud.google.com/logging/docs/agent/configuration#process-payload
> > [2] https://github.com/spring-cloud/spring-cloud-gcp/tree/master/spring-cloud-gcp-logging
> > [3] https://github.com/spring-cloud/spring-cloud-gcp/blob/master/spring-cloud-gcp-logging/src/main/java/org/springframework/cloud/gcp/logging/StackdriverJsonLayout.java


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: GCP logging

Volkan Yazıcı
In reply to this post by Ralph Goers
Yes, as Ralph has noted I am busy with contributing LogstashLayout
into Log4j 2. In the meantime, you can still use LogstashLayout. I see
that you've already created a ticket[1]. I will investigate the
possibility and share the outcome in the ticket. (Maybe even here?)

[1] https://github.com/vy/log4j2-logstash-layout/issues/54

On Fri, Jan 24, 2020 at 5:10 PM Ralph Goers <[hidden email]> wrote:

>
> At first glance I would think that just as we have a GELF Layout we would want a separate StackdriverJsonLayout rather than trying to force it into the generic JsonLayout.
>
> I should also point out that the author of the LogstashLayout [1] is pursuing contributing it to Log4j 2, which seems like a viable alternative to JsonLayout.
>
> [1] https://github.com/vy/log4j2-logstash-layout <https://github.com/vy/log4j2-logstash-layout>
>
> Ralph
>
> > On Jan 24, 2020, at 8:27 AM, Francesco Chicchiriccò <[hidden email]> wrote:
> >
> > Hi there,
> > I would like to configure / extend org.apache.logging.log4j.core.layout.JsonLayout to produce JSON strings compliant with [1], for GCP.
> >
> > I have found that Spring Cloud provides something like this, but based on logback [2]: if I am not mistaking, the most relevant class there is [3].
> >
> > Do you have any suggestion about how to proceed?
> >
> > TIA
> > Regards.
> >
> > [1] https://cloud.google.com/logging/docs/agent/configuration#process-payload
> > [2] https://github.com/spring-cloud/spring-cloud-gcp/tree/master/spring-cloud-gcp-logging
> > [3] https://github.com/spring-cloud/spring-cloud-gcp/blob/master/spring-cloud-gcp-logging/src/main/java/org/springframework/cloud/gcp/logging/StackdriverJsonLayout.java
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
> >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: GCP logging

Volkan Yazıcı
Yet another happy customer[1]!

[1] https://github.com/vy/log4j2-logstash-layout/issues/54#issuecomment-578832994

On Fri, Jan 24, 2020 at 5:37 PM Volkan Yazıcı <[hidden email]> wrote:

>
> Yes, as Ralph has noted I am busy with contributing LogstashLayout
> into Log4j 2. In the meantime, you can still use LogstashLayout. I see
> that you've already created a ticket[1]. I will investigate the
> possibility and share the outcome in the ticket. (Maybe even here?)
>
> [1] https://github.com/vy/log4j2-logstash-layout/issues/54
>
> On Fri, Jan 24, 2020 at 5:10 PM Ralph Goers <[hidden email]> wrote:
> >
> > At first glance I would think that just as we have a GELF Layout we would want a separate StackdriverJsonLayout rather than trying to force it into the generic JsonLayout.
> >
> > I should also point out that the author of the LogstashLayout [1] is pursuing contributing it to Log4j 2, which seems like a viable alternative to JsonLayout.
> >
> > [1] https://github.com/vy/log4j2-logstash-layout <https://github.com/vy/log4j2-logstash-layout>
> >
> > Ralph
> >
> > > On Jan 24, 2020, at 8:27 AM, Francesco Chicchiriccò <[hidden email]> wrote:
> > >
> > > Hi there,
> > > I would like to configure / extend org.apache.logging.log4j.core.layout.JsonLayout to produce JSON strings compliant with [1], for GCP.
> > >
> > > I have found that Spring Cloud provides something like this, but based on logback [2]: if I am not mistaking, the most relevant class there is [3].
> > >
> > > Do you have any suggestion about how to proceed?
> > >
> > > TIA
> > > Regards.
> > >
> > > [1] https://cloud.google.com/logging/docs/agent/configuration#process-payload
> > > [2] https://github.com/spring-cloud/spring-cloud-gcp/tree/master/spring-cloud-gcp-logging
> > > [3] https://github.com/spring-cloud/spring-cloud-gcp/blob/master/spring-cloud-gcp-logging/src/main/java/org/springframework/cloud/gcp/logging/StackdriverJsonLayout.java
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [hidden email]
> > > For additional commands, e-mail: [hidden email]
> > >
> > >
> >

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]