You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Fabrice Triboix <fa...@armedia.com> on 2021/06/24 17:29:37 UTC

What is the "audit log" section in `log4j.properties`?

Hi everyone,

I would like to know what is the "audit log" section in the log4j.properties​ configuration file. What is it about? Also, there is already a log4j.rootLogger​, so will the audit logs also go to the root logger?

Many thanks for your help!

  Fabrice


Re: What is the "audit log" section in `log4j.properties`?

Posted by Fabrice Triboix <fa...@armedia.com>.
So for those interested, the audit log needs to be configured in addition to the root logger, even if both logs to stdout.

My log4j.properties​ looks like this:

log4j.rootLogger=INFO, console
log4j.logger.org.apache.activemq.spring=WARN
log4j.logger.org.apache.activemq.web.handler=WARN
log4j.logger.org.springframework=WARN
log4j.logger.org.apache.xbean=WARN
log4j.logger.org.apache.camel=INFO
log4j.logger.org.eclipse.jetty=WARN

# Console appender
log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=%5p | %m%n
log4j.appender.console.threshold=INFO

###########
# Audit log
###########

log4j.additivity.org.apache.activemq.audit=false
log4j.logger.org.apache.activemq.audit=INFO, audit

log4j.appender.audit=org.apache.log4j.ConsoleAppender
log4j.appender.audit.layout=org.apache.log4j.PatternLayout
log4j.appender.audit.layout.ConversionPattern=%5p | %m%n


________________________________
From: Fabrice Triboix <fa...@armedia.com>
Sent: 24 June 2021 21:00
To: users@activemq.apache.org <us...@activemq.apache.org>
Subject: Re: What is the "audit log" section in `log4j.properties`?

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.


Hi Justin,

All right, thanks.

> Are you actually setting -Dorg.apache.activemq.audit?
No, I am not. But thinking about it, I probably should.

Thanks,

  Fabrice

________________________________
From: Justin Bertram <jb...@apache.org>
Sent: 24 June 2021 20:24
To: users@activemq.apache.org <us...@activemq.apache.org>
Subject: Re: What is the "audit log" section in `log4j.properties`?

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.


> If I remove the "audit log" section for the log4j.properties
configuration file, will I still see the audit logs on stdout?

I don't know off the top of my head. I recommend you just try it out and
see.

Are you actually setting -Dorg.apache.activemq.audit?


Justin

On Thu, Jun 24, 2021 at 2:12 PM Fabrice Triboix <fa...@armedia.com>
wrote:

> Hi Justin,
>
> All right, thanks a lot for the link.
>
> What I want to do is to log everything to stdout. I guess I can set
> log4j.appender.audit=org.apache.log4j.ConsoleAppender​ to that effect.
> However, if I set the root logger to log to stdout already, should I still
> need to set the audit logger?
>
> Or any other words: If I remove the "audit log" section for the
> log4j.properties​ configuration file, will I still see the audit logs on
> stdout?
>
> Thanks a lot for your help!
>
>   Fabrice
>
> ________________________________
> From: Justin Bertram <jb...@apache.org>
> Sent: 24 June 2021 18:48
> To: users@activemq.apache.org <us...@activemq.apache.org>
> Subject: Re: What is the "audit log" section in `log4j.properties`?
>
> CAUTION: This email originated from outside of the organization. Do not
> click links or open attachments unless you recognize the sender and know
> the content is safe.
>
>
> Audit logging is discussed here [1].
>
>
> Justin
>
> [1] https://activemq.apache.org/audit-logging
>
> On Thu, Jun 24, 2021 at 12:30 PM Fabrice Triboix <
> fabrice.triboix@armedia.com> wrote:
>
> > Hi everyone,
> >
> > I would like to know what is the "audit log" section in the
> > log4j.properties​ configuration file. What is it about? Also, there is
> > already a log4j.rootLogger​, so will the audit logs also go to the root
> > logger?
> >
> > Many thanks for your help!
> >
> >   Fabrice
> >
> >
>

Re: What is the "audit log" section in `log4j.properties`?

Posted by Fabrice Triboix <fa...@armedia.com>.
Hi Justin,

All right, thanks.

> Are you actually setting -Dorg.apache.activemq.audit?
No, I am not. But thinking about it, I probably should.

Thanks,

  Fabrice

________________________________
From: Justin Bertram <jb...@apache.org>
Sent: 24 June 2021 20:24
To: users@activemq.apache.org <us...@activemq.apache.org>
Subject: Re: What is the "audit log" section in `log4j.properties`?

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.


> If I remove the "audit log" section for the log4j.properties
configuration file, will I still see the audit logs on stdout?

I don't know off the top of my head. I recommend you just try it out and
see.

Are you actually setting -Dorg.apache.activemq.audit?


Justin

On Thu, Jun 24, 2021 at 2:12 PM Fabrice Triboix <fa...@armedia.com>
wrote:

> Hi Justin,
>
> All right, thanks a lot for the link.
>
> What I want to do is to log everything to stdout. I guess I can set
> log4j.appender.audit=org.apache.log4j.ConsoleAppender​ to that effect.
> However, if I set the root logger to log to stdout already, should I still
> need to set the audit logger?
>
> Or any other words: If I remove the "audit log" section for the
> log4j.properties​ configuration file, will I still see the audit logs on
> stdout?
>
> Thanks a lot for your help!
>
>   Fabrice
>
> ________________________________
> From: Justin Bertram <jb...@apache.org>
> Sent: 24 June 2021 18:48
> To: users@activemq.apache.org <us...@activemq.apache.org>
> Subject: Re: What is the "audit log" section in `log4j.properties`?
>
> CAUTION: This email originated from outside of the organization. Do not
> click links or open attachments unless you recognize the sender and know
> the content is safe.
>
>
> Audit logging is discussed here [1].
>
>
> Justin
>
> [1] https://activemq.apache.org/audit-logging
>
> On Thu, Jun 24, 2021 at 12:30 PM Fabrice Triboix <
> fabrice.triboix@armedia.com> wrote:
>
> > Hi everyone,
> >
> > I would like to know what is the "audit log" section in the
> > log4j.properties​ configuration file. What is it about? Also, there is
> > already a log4j.rootLogger​, so will the audit logs also go to the root
> > logger?
> >
> > Many thanks for your help!
> >
> >   Fabrice
> >
> >
>

Re: What is the "audit log" section in `log4j.properties`?

Posted by Justin Bertram <jb...@apache.org>.
> If I remove the "audit log" section for the log4j.properties
configuration file, will I still see the audit logs on stdout?

I don't know off the top of my head. I recommend you just try it out and
see.

Are you actually setting -Dorg.apache.activemq.audit?


Justin

On Thu, Jun 24, 2021 at 2:12 PM Fabrice Triboix <fa...@armedia.com>
wrote:

> Hi Justin,
>
> All right, thanks a lot for the link.
>
> What I want to do is to log everything to stdout. I guess I can set
> log4j.appender.audit=org.apache.log4j.ConsoleAppender​ to that effect.
> However, if I set the root logger to log to stdout already, should I still
> need to set the audit logger?
>
> Or any other words: If I remove the "audit log" section for the
> log4j.properties​ configuration file, will I still see the audit logs on
> stdout?
>
> Thanks a lot for your help!
>
>   Fabrice
>
> ________________________________
> From: Justin Bertram <jb...@apache.org>
> Sent: 24 June 2021 18:48
> To: users@activemq.apache.org <us...@activemq.apache.org>
> Subject: Re: What is the "audit log" section in `log4j.properties`?
>
> CAUTION: This email originated from outside of the organization. Do not
> click links or open attachments unless you recognize the sender and know
> the content is safe.
>
>
> Audit logging is discussed here [1].
>
>
> Justin
>
> [1] https://activemq.apache.org/audit-logging
>
> On Thu, Jun 24, 2021 at 12:30 PM Fabrice Triboix <
> fabrice.triboix@armedia.com> wrote:
>
> > Hi everyone,
> >
> > I would like to know what is the "audit log" section in the
> > log4j.properties​ configuration file. What is it about? Also, there is
> > already a log4j.rootLogger​, so will the audit logs also go to the root
> > logger?
> >
> > Many thanks for your help!
> >
> >   Fabrice
> >
> >
>

Re: What is the "audit log" section in `log4j.properties`?

Posted by Fabrice Triboix <fa...@armedia.com>.
Hi Justin,

All right, thanks a lot for the link.

What I want to do is to log everything to stdout. I guess I can set log4j.appender.audit=org.apache.log4j.ConsoleAppender​ to that effect. However, if I set the root logger to log to stdout already, should I still need to set the audit logger?

Or any other words: If I remove the "audit log" section for the log4j.properties​ configuration file, will I still see the audit logs on stdout?

Thanks a lot for your help!

  Fabrice

________________________________
From: Justin Bertram <jb...@apache.org>
Sent: 24 June 2021 18:48
To: users@activemq.apache.org <us...@activemq.apache.org>
Subject: Re: What is the "audit log" section in `log4j.properties`?

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.


Audit logging is discussed here [1].


Justin

[1] https://activemq.apache.org/audit-logging

On Thu, Jun 24, 2021 at 12:30 PM Fabrice Triboix <
fabrice.triboix@armedia.com> wrote:

> Hi everyone,
>
> I would like to know what is the "audit log" section in the
> log4j.properties​ configuration file. What is it about? Also, there is
> already a log4j.rootLogger​, so will the audit logs also go to the root
> logger?
>
> Many thanks for your help!
>
>   Fabrice
>
>

Re: What is the "audit log" section in `log4j.properties`?

Posted by Justin Bertram <jb...@apache.org>.
Audit logging is discussed here [1].


Justin

[1] https://activemq.apache.org/audit-logging

On Thu, Jun 24, 2021 at 12:30 PM Fabrice Triboix <
fabrice.triboix@armedia.com> wrote:

> Hi everyone,
>
> I would like to know what is the "audit log" section in the
> log4j.properties​ configuration file. What is it about? Also, there is
> already a log4j.rootLogger​, so will the audit logs also go to the root
> logger?
>
> Many thanks for your help!
>
>   Fabrice
>
>