You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Jens Jahnke <ja...@gmx.net> on 2013/08/06 10:43:30 UTC

Documentation for RequestLogger

Hi,

I'd like to know if there is an official documentation for RequestLogger
anywhere?

I found several small bits on the net, but nothing that gives me a clue
how to actually do some logging.

I know that I have to initialise it somehow like this:

IRequestLoggerSettings requestLogger = Application.get().getRequestLoggerSettings();
requestLogger.setRequestLoggerEnabled(true);

But where do I have to put this initialisation? I've put it into my apps init() 
but it does nothing except creating an empty log file.

My log4j.properties:

log4j.category.org.apache.wicket.protocol.http.RequestLogger=INFO,RequestLogger
log4j.additivity.org.apache.wicket.protocol.http.RequestLogger=false
log4j.appender.RequestLogger=org.apache.log4j.RollingFileAppender
log4j.appender.RequestLogger.File=${catalina.home}/logs/wicket-requests.log
log4j.appender.RequestLogger.MaxFileSize=10MB
log4j.appender.RequestLogger.MaxBackupIndex=10
log4j.appender.RequestLogger.layout=org.apache.log4j.PatternLayout
log4j.appender.RequestLogger.layout.ConversionPattern=%d{ISO8601} %-5p- %-26.26c{1} - %m\n


Regards,

Jens

-- 
06. Ernting 2013, 10:38
Homepage : http://www.jan0sch.de

Kirk to Enterprise...

Re: Documentation for RequestLogger

Posted by Cedric Gatay <ga...@gmail.com>.
I guess he's talking of its current log4j setup which logs to stdout

__
Cedric Gatay (@Cedric_Gatay <http://twitter.com/Cedric_Gatay>)
http://code-troopers.com | http://www.bloggure.info | http://cedric.gatay.fr


On Wed, Aug 7, 2013 at 10:11 AM, Martin Grigorov <mg...@apache.org>wrote:

> On Wed, Aug 7, 2013 at 10:07 AM, Jens Jahnke <ja...@gmx.net> wrote:
>
> > Hi,
> >
> > On Tue, 6 Aug 2013 15:11:34 -0400
> > Paul Bors <pa...@bors.ws> wrote:
> >
> > PB> Isn't Log4J shipped with the quick-start?
> > PB>
> > PB> Create yourself a quick-start and analyze it:
> > PB> http://wicket.apache.org/start/quickstart.html
> > PB>
> > PB> PS: You can also check the initialization related topics as well as
> > PB> your first stop for Wicket's doc via the Wicket Free Guide at:
> > PB> http://wicket.apache.org/learn/books/freeguide.html
> >
> > thanks for the information, the freeguide rocks.
> >
> > But actually I found the solution in wicket in action. :)
> >
> > Nonetheless it only logs to stdout but I guess thats a log4j question.
> >
>
> What do you mean that it logs to stdout ?
> There is no usage of System.out/err in Wicket. The RequestLogger uses
> SLF4J.
> Your question is really a log4j question (if you use slf4j-log4j as
> backend).
>
>
> >
> > Regards,
> >
> > Jens
> >
> > --
> > 07. Ernting 2013, 10:04
> > Homepage : http://www.jan0sch.de
> >
> > In order to live free and happily, you must sacrifice boredom.
> > It is not always an easy sacrifice.
> >
>

Re: Documentation for RequestLogger

Posted by Jens Jahnke <ja...@gmx.net>.
Hi,

On Wed, 7 Aug 2013 10:11:30 +0200
Martin Grigorov <mg...@apache.org> wrote:

MG> On Wed, Aug 7, 2013 at 10:07 AM, Jens Jahnke <ja...@gmx.net>
MG> wrote:
MG> 
MG> > Hi,
MG> >
MG> > On Tue, 6 Aug 2013 15:11:34 -0400
MG> > Paul Bors <pa...@bors.ws> wrote:
MG> >
MG> > PB> Isn't Log4J shipped with the quick-start?
MG> > PB>
MG> > PB> Create yourself a quick-start and analyze it:
MG> > PB> http://wicket.apache.org/start/quickstart.html
MG> > PB>
MG> > PB> PS: You can also check the initialization related topics as
MG> > PB> well as your first stop for Wicket's doc via the Wicket Free
MG> > PB> Guide at: http://wicket.apache.org/learn/books/freeguide.html
MG> >
MG> > thanks for the information, the freeguide rocks.
MG> >
MG> > But actually I found the solution in wicket in action. :)
MG> >
MG> > Nonetheless it only logs to stdout but I guess thats a log4j
MG> > question.
MG> >
MG> 
MG> What do you mean that it logs to stdout ?
MG> There is no usage of System.out/err in Wicket. The RequestLogger
MG> uses SLF4J. Your question is really a log4j question (if you use
MG> slf4j-log4j as backend).

sorry, I didn't express myself correctly. It logged to catalina.out
(tomcat).

I was able to solve the issue. Somehow I had slf4j-simple in my pom.xml
file. After changing that to slf4j-log4j12 everything works as expected.

Regards,

Jens

-- 
07. Ernting 2013, 11:14
Homepage : http://www.jan0sch.de

Never tell people how to do things.  Tell them WHAT to
do and they will surprise you with their ingenuity.
		-- Gen. George S. Patton, Jr.

Re: Documentation for RequestLogger

Posted by Martin Grigorov <mg...@apache.org>.
On Wed, Aug 7, 2013 at 10:07 AM, Jens Jahnke <ja...@gmx.net> wrote:

> Hi,
>
> On Tue, 6 Aug 2013 15:11:34 -0400
> Paul Bors <pa...@bors.ws> wrote:
>
> PB> Isn't Log4J shipped with the quick-start?
> PB>
> PB> Create yourself a quick-start and analyze it:
> PB> http://wicket.apache.org/start/quickstart.html
> PB>
> PB> PS: You can also check the initialization related topics as well as
> PB> your first stop for Wicket's doc via the Wicket Free Guide at:
> PB> http://wicket.apache.org/learn/books/freeguide.html
>
> thanks for the information, the freeguide rocks.
>
> But actually I found the solution in wicket in action. :)
>
> Nonetheless it only logs to stdout but I guess thats a log4j question.
>

What do you mean that it logs to stdout ?
There is no usage of System.out/err in Wicket. The RequestLogger uses SLF4J.
Your question is really a log4j question (if you use slf4j-log4j as
backend).


>
> Regards,
>
> Jens
>
> --
> 07. Ernting 2013, 10:04
> Homepage : http://www.jan0sch.de
>
> In order to live free and happily, you must sacrifice boredom.
> It is not always an easy sacrifice.
>

Re: Documentation for RequestLogger

Posted by Jens Jahnke <ja...@gmx.net>.
Hi,

On Tue, 6 Aug 2013 15:11:34 -0400
Paul Bors <pa...@bors.ws> wrote:

PB> Isn't Log4J shipped with the quick-start?
PB> 
PB> Create yourself a quick-start and analyze it:
PB> http://wicket.apache.org/start/quickstart.html
PB> 
PB> PS: You can also check the initialization related topics as well as
PB> your first stop for Wicket's doc via the Wicket Free Guide at:
PB> http://wicket.apache.org/learn/books/freeguide.html

thanks for the information, the freeguide rocks.

But actually I found the solution in wicket in action. :)

Nonetheless it only logs to stdout but I guess thats a log4j question.

Regards,

Jens

-- 
07. Ernting 2013, 10:04
Homepage : http://www.jan0sch.de

In order to live free and happily, you must sacrifice boredom.
It is not always an easy sacrifice.

RE: Documentation for RequestLogger

Posted by Paul Bors <pa...@bors.ws>.
Isn't Log4J shipped with the quick-start?

Create yourself a quick-start and analyze it:
http://wicket.apache.org/start/quickstart.html

PS: You can also check the initialization related topics as well as your
first stop for Wicket's doc via the Wicket Free Guide at:
http://wicket.apache.org/learn/books/freeguide.html

~ Thank you,
  Paul Bors


-----Original Message-----
From: Jens Jahnke [mailto:jan0sch@gmx.net] 
Sent: Tuesday, August 06, 2013 4:44 AM
To: users@wicket.apache.org
Subject: Documentation for RequestLogger

Hi,

I'd like to know if there is an official documentation for RequestLogger
anywhere?

I found several small bits on the net, but nothing that gives me a clue how
to actually do some logging.

I know that I have to initialise it somehow like this:

IRequestLoggerSettings requestLogger =
Application.get().getRequestLoggerSettings();
requestLogger.setRequestLoggerEnabled(true);

But where do I have to put this initialisation? I've put it into my apps
init() but it does nothing except creating an empty log file.

My log4j.properties:

log4j.category.org.apache.wicket.protocol.http.RequestLogger=INFO,RequestLog
ger
log4j.additivity.org.apache.wicket.protocol.http.RequestLogger=false
log4j.appender.RequestLogger=org.apache.log4j.RollingFileAppender
log4j.appender.RequestLogger.File=${catalina.home}/logs/wicket-requests.log
log4j.appender.RequestLogger.MaxFileSize=10MB
log4j.appender.RequestLogger.MaxBackupIndex=10
log4j.appender.RequestLogger.layout=org.apache.log4j.PatternLayout
log4j.appender.RequestLogger.layout.ConversionPattern=%d{ISO8601} %-5p-
%-26.26c{1} - %m\n


Regards,

Jens

--
06. Ernting 2013, 10:38
Homepage : http://www.jan0sch.de

Kirk to Enterprise...



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org