Re: logging 404s

2012-03-04 Thread Martin Grigorov
Hi,

Servlet specification says that the original request should be
available in request attribute named "javax.servlet.error.request_uri"
See org.apache.wicket.protocol.http.servlet.ErrorAttributes

On Mon, Mar 5, 2012 at 6:15 AM, Douglas Ferguson  wrote:
> I setup a 404 handler in my web.xml to point to a wicket page.
>
> I'd like to be able to log what the original request was, but I'm having 
> trouble figuring this out.
>
> Douglas
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: logging the page class name

2011-12-01 Thread Marcelo Morales
On Tue, Nov 29, 2011 at 12:23 PM, fachhoch  wrote:
> I want to log all the pages users   are  viewing  without any much detail
> just  the page   class  name .
> is there any way I can get this without adding my own log statements in code
> ?

Override
on Application#init():
getRequestLoggerSettings().setRequestLoggerEnabled(true);

and put the logger org.apache.wicket.protocol.http.RequestLogger to debug.

-- 
Marcelo Morales

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



Re: logging the page class name

2011-12-01 Thread nino martinez wael
Yeah and use context based logging
On Nov 29, 2011 5:32 PM, "Thomas Götz"  wrote:

> I would create my own base Page (where all other pages extend from) and
> add the desired logging statement there (onConfigure(), onBeforeRender()).
> Most of the times you already have a common base page anyway …
>
> Cheers,
>   -Tom
>
>
> fachhoch wrote:
>
> > I want to log all the pages users   are  viewing  without any much detail
> > just  the page   class  name .
> > is there any way I can get this without adding my own log statements in
> code
> > ?
> >
> >
> >
> >
> > --
> > View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/logging-the-page-class-name-tp4119768p4119768.html
> > Sent from the Users forum mailing list archive at Nabble.com.
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: logging the page class name

2011-11-29 Thread Thomas Götz
I would create my own base Page (where all other pages extend from) and add the 
desired logging statement there (onConfigure(), onBeforeRender()). Most of the 
times you already have a common base page anyway …

Cheers,
   -Tom


fachhoch wrote:

> I want to log all the pages users   are  viewing  without any much detail
> just  the page   class  name .
> is there any way I can get this without adding my own log statements in code
> ?
> 
> 
> 
> 
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/logging-the-page-class-name-tp4119768p4119768.html
> Sent from the Users forum mailing list archive at Nabble.com.
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 


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



Re: logging the page class name

2011-11-29 Thread Martin Grigorov
Enable DEBUG for org.apache.wicket.Page and you will see messages
like: ending request for page " + this + ", request " + getRequest()

On Tue, Nov 29, 2011 at 5:23 PM, fachhoch  wrote:
> I want to log all the pages users   are  viewing  without any much detail
> just  the page   class  name .
> is there any way I can get this without adding my own log statements in code
> ?
>
>
>
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/logging-the-page-class-name-tp4119768p4119768.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: Logging sessionId for every log event

2010-09-16 Thread Igor Vaynberg
wrap a filter around wicket filter

-igor

On Thu, Sep 16, 2010 at 9:07 AM, Jeffrey Schneller
 wrote:
> I am trying to log the session id with every log event so that I can
> trace a visitors steps in the log file.  I am using log4j and was hoping
> I could use either the NDC or MDC.  I am not able to figure out where to
> push the session id into the context and pop it out of the context when
> using NDC.  If I wanted to use MDC, where could I put the session id in
> to the map for each request?  Is there a particular wicket method to
> override and put this in?  Should this be done as a servlet filter
> instead [before or after OSIV filter]?
>
>
>
> Thanks for any help.
>
>
>
>
>
>

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



RE: Logging

2010-07-19 Thread Alex Rass
Yup :)  Martin's right, this is a bad way of doing it!

You should be getting a logger for your own class. So when the logger does
log - it knows where the errors come from and helps you create proper stack
traces.
You'll also have better control over log levels for different
classes/packages in the future.

private static final Logger log =
LoggerFactory.getLogger(CurrentClassHere.class);

- Alex 

-Original Message-
From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com] 
Sent: Thursday, July 15, 2010 4:15 AM
To: users@wicket.apache.org
Subject: Re: Logging

That's a whole another story ... ;)

**
Martin

2010/7/15 Josh Kamau :
> Thanks Martin. I wanted to make sure am doing the right thing..
>
> Regards.
> On Thu, Jul 15, 2010 at 10:59 AM, Martin Makundi < 
> martin.maku...@koodaripalvelut.com> wrote:
>
>>        private static final Logger log = 
>> LoggerFactory.getLogger(WebPage.class);
>>
>>
>> 2010/7/15 Josh Kamau :
>> > Hi guys;
>> >
>> > I know wicket comes with pre configured logging . How do i get hold 
>> > of
>> the
>> > Logger object so that i can log messages in my pages and panels?
>> >
>> > regards.
>> >
>> > Josh.
>> >
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>

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



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



Re: Logging

2010-07-15 Thread Martin Makundi
That's a whole another story ... ;)

**
Martin

2010/7/15 Josh Kamau :
> Thanks Martin. I wanted to make sure am doing the right thing..
>
> Regards.
> On Thu, Jul 15, 2010 at 10:59 AM, Martin Makundi <
> martin.maku...@koodaripalvelut.com> wrote:
>
>>        private static final Logger log =
>> LoggerFactory.getLogger(WebPage.class);
>>
>>
>> 2010/7/15 Josh Kamau :
>> > Hi guys;
>> >
>> > I know wicket comes with pre configured logging . How do i get hold of
>> the
>> > Logger object so that i can log messages in my pages and panels?
>> >
>> > regards.
>> >
>> > Josh.
>> >
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>

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



Re: Logging

2010-07-15 Thread Josh Kamau
Thanks Martin. I wanted to make sure am doing the right thing..

Regards.
On Thu, Jul 15, 2010 at 10:59 AM, Martin Makundi <
martin.maku...@koodaripalvelut.com> wrote:

>private static final Logger log =
> LoggerFactory.getLogger(WebPage.class);
>
>
> 2010/7/15 Josh Kamau :
> > Hi guys;
> >
> > I know wicket comes with pre configured logging . How do i get hold of
> the
> > Logger object so that i can log messages in my pages and panels?
> >
> > regards.
> >
> > Josh.
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Logging

2010-07-15 Thread Martin Makundi
private static final Logger log = 
LoggerFactory.getLogger(WebPage.class);


2010/7/15 Josh Kamau :
> Hi guys;
>
> I know wicket comes with pre configured logging . How do i get hold of the
> Logger object so that i can log messages in my pages and panels?
>
> regards.
>
> Josh.
>

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



Re: Logging popup

2010-06-02 Thread Jeremy Thomerson
On Wed, Jun 2, 2010 at 3:11 PM, Hans Friederichs  wrote:

> Hello you all,
>
> I'm quite new to wicket, but I've made a rather complex application using
> it.
> It's a web-application that gives users the opportunity to start and view
> deployment processes.
> Each proces is represented on the main page by a row in a List(Model), and
> when a row represents a busy process, there's a button to show the logoutput
> as it grows.
> This is what I want to do: when a "Show log-button" is clicked, a popup
> window appears that shows the loglines and the progression, i.e. it
> autoscrolls when new lines come from the underlying proces that is executed
> on the server.
> Each process has a unique ID, and that's in fact all I have to pass to the
> Popup Window, because I can create a Model there that provides for the
> loglines.
> I don't want a BookMarkablePageLink, that's idiot. In another post I read
> something like "use a plain Link and a Page with a constructor to pass your
> object", but I can't figure that out. Or should I use a ModalWindow?
> Please help!
>
> Hans
>
>
add(new Link("link", new
Model(listItem.getModelObject().getProcessID())) {
  void onClick() {
String processID = getModelObject();
setResponsePage(new LoggingDetailPage(processID));
  }
});

-- 
Jeremy Thomerson
http://www.wickettraining.com


Re: Logging configuration trouble

2009-12-29 Thread Martin Zardecki

Think I figured this out; it appears to be related to the order things
happen.

I originally had my logging initialization as the first line in my
Application init() method.

Unfortunately this occurs after some of the class Loggers get initialized
statically and consequently our initialization occurs too late.

If I place my initialization as the first line of the constructor class or
as a static initialization everything appears to work properly.

This could also solve the problem of some people who have mentioned issues
with their formatters.

HTH

MZ


Martin Zardecki wrote:
> 
> Hi list, I'm using Java Utils Logging along with Wicket and I have a
> log.properties which I read in the WicketApplication init method as
> follows:
> 
> java.util.logging.LogManager.getLogManager().readConfiguration(input);
> 
> I confirm that my log.properties is read in correctly using a debugger.
> 
> ---
> My log.properties file is as follows:
> 
> # Specify the handlers to create in the root logger
> # (all loggers are children of the root logger)
> # The following creates two handlers
> handlers = java.util.logging.ConsoleHandler, java.util.logging.FileHandler
> 
> # Set the default logging level for the root logger
> .level = WARNING
> 
> # Set the default logging level for new ConsoleHandler instances
> java.util.logging.ConsoleHandler.level = ALL
> java.util.logging.ConsoleHandler.formatter =
> java.util.logging.SimpleFormatter
> 
> # Set the default logging level for new FileHandler instances
> java.util.logging.FileHandler.level = ALL
> java.util.logging.FileHandler.pattern = %h/stagetwo.log
> java.util.logging.FileHandler.limit = 5
> java.util.logging.FileHandler.count = 1
> java.util.logging.FileHandler.formatter =
> java.util.logging.SimpleFormatter
> 
> # Set the default logging level for the logger named com.truecool
> com.truecool.stagetwo.level = WARNING
> 
> org.apache.wicket.level = WARNING
> org.apache.wicket.markup.resolver.WicketMessageResolver.level = SEVERE
> 
> # Hibernate Logging options
> #logger.org.hibernate=info
> org.hibernate.level = WARNING
> ---
> 
> For whatever reason I'm still getting all the WicketMessageResolver
> warnings in my logs.
> 
> Any suggestions on how to get rid of the WicketMessageResolver warnings?
> 
> Thanks,
> 
> Martin Zardecki
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Logging-configuration-trouble-tp26867097p26961354.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



RE: Logging configuration for Wicket - Newbie

2009-07-08 Thread Rowe, Richard A.
Thanks, Maarten. Richard



From: users-return-39497-richard.a.rowe=saic@wicket.apache.org on behalf of 
Maarten Bosteels
Sent: Wed 7/8/2009 4:37 PM
To: users@wicket.apache.org
Subject: Re: Logging configuration for Wicket - Newbie



http://logging.apache.org/log4j/1.2/manual.html

Hint:  Setting your your root logger on WARN and explicitly lower the level
for specific loggers (eg your own classes) is easier than trying the
opposite.

log4j.rootLogger=WARN
log4j.logger.org.apache.wicket=INFO


Maarten

On Wed, Jul 8, 2009 at 6:46 PM, Rowe, Richard A. wrote:

> I am trying to get my logging configured for a Wicket application. I am
> using SLF4J and LOG4J. I have configured two appenders (Console and
> File). I am noticing that all Wicket rendering statements are going to
> my log file (INFO, DEBUG, etc). This is not desirable. How do I turn
> this off? Thanks.
>
>
>
>
>
> Richard
>
>
>
>
>
>
>
>




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

Re: Logging configuration for Wicket - Newbie

2009-07-08 Thread Maarten Bosteels
http://logging.apache.org/log4j/1.2/manual.html

Hint:  Setting your your root logger on WARN and explicitly lower the level
for specific loggers (eg your own classes) is easier than trying the
opposite.

log4j.rootLogger=WARN
log4j.logger.org.apache.wicket=INFO


Maarten

On Wed, Jul 8, 2009 at 6:46 PM, Rowe, Richard A. wrote:

> I am trying to get my logging configured for a Wicket application. I am
> using SLF4J and LOG4J. I have configured two appenders (Console and
> File). I am noticing that all Wicket rendering statements are going to
> my log file (INFO, DEBUG, etc). This is not desirable. How do I turn
> this off? Thanks.
>
>
>
>
>
> Richard
>
>
>
>
>
>
>
>


Re: Logging to an additional File

2009-06-06 Thread nino martinez wael
hmm I usually dont put anything in the log location, and the log ends
up the correct place... On tomcat thats either log folder or in the
extracted war..

2009/6/5 Francisco Diaz Trepat - gmail :
> :-)
> Tonio, my man. Thank you so much for your reply.
>
> I'm looking for some alternatives.
>
> I'll see to post (mail) my conclusions if any.
>
> f(t)
>
> On Fri, Jun 5, 2009 at 3:36 PM, Tonio Caputo  wrote:
>
>> Francisco,
>>
>> I'm not a wicket expert (as you know), the log4j configuration seems to be
>> ok, so probably
>> the reason for the problem is in other place.
>>
>> hope this helps
>> tonio
>>
>>
>>
>>
>> On Thu, Jun 4, 2009 at 5:18 PM, Francisco Diaz Trepat - gmail <
>> francisco.diaztre...@gmail.com> wrote:
>>
>> > Hi all,
>> > I'm having a small problem trying to log to an additional file with a
>> >  org.apache.log4j.FileAppender.
>> >
>> > Problem: Does not log Wicket stuff to the file. For instance this
>> message:
>> >
>> > "WARNING: Tried to retrieve a localized string for a component that has
>> not
>> > yet been added to the page.".
>> >
>> > Is written to the StdOut which netbeans shows in its output window. But
>> > this
>> > message doesn't appears in my MyLog.log file.
>> >
>> > I have this log4j property file:
>> >
>> > log4j.debug=false log4j.rootLogger=INFO,Stdout,Fileappender
>> > log4j.logger.org=INFO
>> > log4j.logger.com=INFO log4j.logger.net=INFO log4j.logger.nl=INFO
>> > log4j.logger.org.apache.wicket=INFO
>> > log4j.logger.org.apache.wicket.protocol.http.HttpSessionStore=INFO
>> > log4j.logger.org.apache.catalina.cluster=INFO
>> > log4j.logger.org.apache.wicket.version=INFO
>> > log4j.logger.org.apache.wicket.RequestCycle=INFO
>> > log4j.appender.Stdout=org.apache.log4j.ConsoleAppender
>> > log4j.appender.Stdout.layout=org.apache.log4j.PatternLayout
>> > log4j.appender.Stdout.layout.conversionPattern=%-5p - %-26.26c{1} - %m\n
>> #
>> > Additional configuration
>> > log4j.appender.Fileappender=org.apache.log4j.FileAppender
>> > log4j.appender.Fileappender.file=${mylog.log.dir}/logs/MyLog.log
>> > log4j.appender.Fileappender.layout=org.apache.log4j.PatternLayout
>> > log4j.appender.Fileappender.layout.conversionPattern=%d [%t] %p - %m%n
>> >
>> > Is this correct?
>> >
>> > Can anyone comment?
>> >
>> > Thanks,
>> > f(t)
>> >
>>
>

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



Re: Logging to an additional File

2009-06-05 Thread Francisco Diaz Trepat - gmail
:-)
Tonio, my man. Thank you so much for your reply.

I'm looking for some alternatives.

I'll see to post (mail) my conclusions if any.

f(t)

On Fri, Jun 5, 2009 at 3:36 PM, Tonio Caputo  wrote:

> Francisco,
>
> I'm not a wicket expert (as you know), the log4j configuration seems to be
> ok, so probably
> the reason for the problem is in other place.
>
> hope this helps
> tonio
>
>
>
>
> On Thu, Jun 4, 2009 at 5:18 PM, Francisco Diaz Trepat - gmail <
> francisco.diaztre...@gmail.com> wrote:
>
> > Hi all,
> > I'm having a small problem trying to log to an additional file with a
> >  org.apache.log4j.FileAppender.
> >
> > Problem: Does not log Wicket stuff to the file. For instance this
> message:
> >
> > "WARNING: Tried to retrieve a localized string for a component that has
> not
> > yet been added to the page.".
> >
> > Is written to the StdOut which netbeans shows in its output window. But
> > this
> > message doesn't appears in my MyLog.log file.
> >
> > I have this log4j property file:
> >
> > log4j.debug=false log4j.rootLogger=INFO,Stdout,Fileappender
> > log4j.logger.org=INFO
> > log4j.logger.com=INFO log4j.logger.net=INFO log4j.logger.nl=INFO
> > log4j.logger.org.apache.wicket=INFO
> > log4j.logger.org.apache.wicket.protocol.http.HttpSessionStore=INFO
> > log4j.logger.org.apache.catalina.cluster=INFO
> > log4j.logger.org.apache.wicket.version=INFO
> > log4j.logger.org.apache.wicket.RequestCycle=INFO
> > log4j.appender.Stdout=org.apache.log4j.ConsoleAppender
> > log4j.appender.Stdout.layout=org.apache.log4j.PatternLayout
> > log4j.appender.Stdout.layout.conversionPattern=%-5p - %-26.26c{1} - %m\n
> #
> > Additional configuration
> > log4j.appender.Fileappender=org.apache.log4j.FileAppender
> > log4j.appender.Fileappender.file=${mylog.log.dir}/logs/MyLog.log
> > log4j.appender.Fileappender.layout=org.apache.log4j.PatternLayout
> > log4j.appender.Fileappender.layout.conversionPattern=%d [%t] %p - %m%n
> >
> > Is this correct?
> >
> > Can anyone comment?
> >
> > Thanks,
> > f(t)
> >
>


Re: Logging to an additional File

2009-06-05 Thread Tonio Caputo
Francisco,

I'm not a wicket expert (as you know), the log4j configuration seems to be
ok, so probably
the reason for the problem is in other place.

hope this helps
tonio




On Thu, Jun 4, 2009 at 5:18 PM, Francisco Diaz Trepat - gmail <
francisco.diaztre...@gmail.com> wrote:

> Hi all,
> I'm having a small problem trying to log to an additional file with a
>  org.apache.log4j.FileAppender.
>
> Problem: Does not log Wicket stuff to the file. For instance this message:
>
> "WARNING: Tried to retrieve a localized string for a component that has not
> yet been added to the page.".
>
> Is written to the StdOut which netbeans shows in its output window. But
> this
> message doesn't appears in my MyLog.log file.
>
> I have this log4j property file:
>
> log4j.debug=false log4j.rootLogger=INFO,Stdout,Fileappender
> log4j.logger.org=INFO
> log4j.logger.com=INFO log4j.logger.net=INFO log4j.logger.nl=INFO
> log4j.logger.org.apache.wicket=INFO
> log4j.logger.org.apache.wicket.protocol.http.HttpSessionStore=INFO
> log4j.logger.org.apache.catalina.cluster=INFO
> log4j.logger.org.apache.wicket.version=INFO
> log4j.logger.org.apache.wicket.RequestCycle=INFO
> log4j.appender.Stdout=org.apache.log4j.ConsoleAppender
> log4j.appender.Stdout.layout=org.apache.log4j.PatternLayout
> log4j.appender.Stdout.layout.conversionPattern=%-5p - %-26.26c{1} - %m\n #
> Additional configuration
> log4j.appender.Fileappender=org.apache.log4j.FileAppender
> log4j.appender.Fileappender.file=${mylog.log.dir}/logs/MyLog.log
> log4j.appender.Fileappender.layout=org.apache.log4j.PatternLayout
> log4j.appender.Fileappender.layout.conversionPattern=%d [%t] %p - %m%n
>
> Is this correct?
>
> Can anyone comment?
>
> Thanks,
> f(t)
>


Re: Logging for performance analysis

2009-04-28 Thread Jonathan Locke


yeah, i think yourkit is the way to go.


Martijn Dashorst wrote:
> 
> At my job we were able to connect yourkit to our production server and
> diagnose the problem in that way. If you have such spikes, it usually
> is the garbage collector trying to clean up.
> 
> Martijn
> 
> On Mon, Apr 27, 2009 at 10:39 PM, Douglas Ferguson
>  wrote:
>> We are experiencing some hard to trace performance issues (CPU pegged by
>> JAVA). so we want to implement some logging in order to Audit the code.
>>
>> Any suggestions on wicket state that we can easily print out? I.E. size
>> of page map? Etc?
>>
>> D/
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
> 
> 
> 
> -- 
> Become a Wicket expert, learn from the best: http://wicketinaction.com
> Apache Wicket 1.3.5 is released
> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Logging-for-performance-analysis-tp23264635p23291442.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Logging for performance analysis

2009-04-28 Thread Daniel Toffetti
Douglas Ferguson  douglasferguson.us> writes:
> 
> I will definitely share my findings. I saw 400% CPU (we have 4 proc box),
> the other day!
> 
> What debugging approach are you taking?
> 
> Douglas
> 

I've tried a couple monitoring tools for Tomcat, but they where too
intrusive (required installation on the server). There was one in particular
that only required configuring Java for JMX (Management Extensions) but I had to
do other things and I will get into it in a few days I hope.
My suspicion is that the problem can be memory leaks in the library we use
to access the database. It was withdrawn from sourceforge recently and I plan to
change it to something else.
For your interest, I can tell you that the response and performance greatly
improved when I changed the model for a couple of data tables to
LoadableDetachableModel.
This is our first Java web app so a lot of inexperience with all the tools,
but Tomcat not only get stuck to 30-80% CPU from time to time but it even
crashes sometimes, I'm afraid I'm missing some obvious configuration.

Cheers,

Daniel



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



Re: Logging for performance analysis

2009-04-28 Thread Martijn Dashorst
At my job we were able to connect yourkit to our production server and
diagnose the problem in that way. If you have such spikes, it usually
is the garbage collector trying to clean up.

Martijn

On Mon, Apr 27, 2009 at 10:39 PM, Douglas Ferguson
 wrote:
> We are experiencing some hard to trace performance issues (CPU pegged by 
> JAVA). so we want to implement some logging in order to Audit the code.
>
> Any suggestions on wicket state that we can easily print out? I.E. size of 
> page map? Etc?
>
> D/
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.5 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

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



RE: Logging for performance analysis

2009-04-27 Thread Douglas Ferguson
I will definitely share my findings. I saw 400% CPU (we have 4 proc box), the 
other day!

What debugging approach are you taking?

Douglas

-Original Message-
From: news [mailto:n...@ger.gmane.org] On Behalf Of Daniel Toffetti
Sent: Monday, April 27, 2009 9:46 PM
To: users@wicket.apache.org
Subject: Re: Logging for performance analysis

Douglas Ferguson  douglasferguson.us> writes:
> 
> We are experiencing some hard to trace performance issues (CPU pegged by
JAVA). so we want to implement some
> logging in order to Audit the code.
> 
> Any suggestions on wicket state that we can easily print out? I.E. size of
page map? Etc?
> 
> D/

Hi,

I'm having similar problems, my setup is: Java 1.6.10, Wicket 1.3.5 and
Tomcat 6 on Windows XP. Tomcat seems to need 50% CPU from time to time, and
often for a very long time.
Will try Jeremy's suggestion, mind to share your findings ?

Cheers,

Daniel



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


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



Re: Logging for performance analysis

2009-04-27 Thread Daniel Toffetti
Douglas Ferguson  douglasferguson.us> writes:
> 
> We are experiencing some hard to trace performance issues (CPU pegged by
JAVA). so we want to implement some
> logging in order to Audit the code.
> 
> Any suggestions on wicket state that we can easily print out? I.E. size of
page map? Etc?
> 
> D/

Hi,

I'm having similar problems, my setup is: Java 1.6.10, Wicket 1.3.5 and
Tomcat 6 on Windows XP. Tomcat seems to need 50% CPU from time to time, and
often for a very long time.
Will try Jeremy's suggestion, mind to share your findings ?

Cheers,

Daniel



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



Re: Logging for performance analysis

2009-04-27 Thread Jeremy Thomerson
turn on the request logger - it dumps a ton of data on every request.
i think it's in the debug settings IIRC

--
Jeremy Thomerson
http://www.wickettraining.com




On Mon, Apr 27, 2009 at 3:39 PM, Douglas Ferguson
 wrote:
> We are experiencing some hard to trace performance issues (CPU pegged by 
> JAVA). so we want to implement some logging in order to Audit the code.
>
> Any suggestions on wicket state that we can easily print out? I.E. size of 
> page map? Etc?
>
> D/
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



Re: Logging from Wicket alone and together with Spring and Hibernate + my own code

2009-01-20 Thread Erik van Oosten

Hi Kent,

I am using the SLF4j implementation of commons-logging. If you use 
maven2 take a look at this blog article for an pom example that will set 
this up with log4j as logging backend: 
http://day-to-day-stuff.blogspot.com/2007/07/no-more-commons-logging.html.


Below is a more up to date pom extract that also adds a 
java.util.logging to slf4j bridge (you need to call 
SLF4JBridgeHandler.install() at some point during application init).


Regards,
   Erik.

   
   
   
   commons-logging
   commons-logging
   99.0-does-not-exist
   provided
   
   
   
   org.slf4j
   jcl-over-slf4j
   1.5.2
   
   
   
   org.slf4j
   jul-to-slf4j
   1.5.2
   

   
   org.slf4j
   slf4j-api
   1.5.2
   
   
   
   org.slf4j
   slf4j-log4j12
   1.5.2
   
   
   log4j
   log4j
   1.2.14
   
   




Kent Larsson wrote

Hi, I have some questions about logging, more specifically about setting it
up and making sure it works.

The project I'm doing will use Wicket, Spring and Hibernate. I know that
Wicket and Hibernate uses Simple Logging Facade for Java (SL4J) and that
Spring is using the logging component from Apache Commons.

Will they co-exist happily?
I thought I would use log4j together with both SL4J and the logging
component from Apache commons, do you think that's a good idea?

Can I set up them all to output logging data into a common file?
Or should I use separate files?
Or should I store the logging messages in the database? (I'd rather not, as
I find grepping etc on text files quite convenient.)

Not strictly Wicket, but for Spring I guess I need some kind of
configuration file for the Apache Commons logging component as well where I
direct it to use log4j?

When I've set these up I guess to see that everything works I set the
logging level to INFO as it's fairly certain that all three of the
frameworks output some information in that mode? Or is there an even better
way to make sure?

And my last question. In the project I'm starting, do you recommend that I
use SL4J for my own logging purposes? (I thought I would use log4j directly,
but that was before I learned a little bit more about logging and a lot of
respectable libraries seem to choose the path of a bridge/facade for their
logging needs. And if it gets us flexibility without added cost there's no
reason not to do it that way.)

I'm looking forward to hearing more from you about how you are doing your
logging. It's a new area for me which I'm eager to improve myself in.

Best regards, Kent

  

--
Erik van Oosten
http://day-to-day-stuff.blogspot.com/



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



Re: Logging every request into db

2008-04-17 Thread Artur W.


Gerolf Seitz wrote:
> 
> you could do that in your own WebRequestCycle subclass in the
> onBeginRequest method.
> 

Thanks, This was exactly what I was looking for!

Artur

-- 
View this message in context: 
http://www.nabble.com/Logging-every-request-into-db-tp16740900p16743061.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Logging every request into db

2008-04-17 Thread Gerolf Seitz
you could do that in your own WebRequestCycle subclass in the
onBeginRequest method.

  Gerolf

On Thu, Apr 17, 2008 at 10:12 AM, Artur W. <[EMAIL PROTECTED]> wrote:

>
> Hi!
>
> I need to log every request (session id, ip address, user id, url,
> response
> time etc) into db.
>
> The code is simply:
>
>RequestCycle requestCycle = RequestCycle.get();
>HttpServletRequest servletRequest =
> ((WebRequest)requestCycle.getRequest()).getHttpServletRequest();
>AdminSession adminSession = (AdminSession)
> requestCycle.getSession();
>
>log.info(adminSession.getId() + " " +
>servletRequest.getRemoteAddr() + " " +
>adminSession.getWorkerId() + " " +
>servletRequest.getRequestURL() + " " +
>(System.currentTimeMillis() -
> requestCycle.getStartTime()));
>
> But I don't know where to put it. I tried to add it the the WicketFilter:
>
> public class MyWicketFilter extends WicketFilter {
>
>@Override
>public void doFilter(ServletRequest request, ServletResponse response,
> FilterChain chain) throws IOException, ServletException {
>
>super.doFilter(request, response, chain);
>
>RequestCycle requestCycle = RequestCycle.get();
>//  logging goes here
>
>}
> }
>
> But RequestCycle.get() returns null.
>
>
> I will appreciate any suggestions.
>
>
> Thanks,
> Artur
>
>
> --
> View this message in context:
> http://www.nabble.com/Logging-every-request-into-db-tp16740900p16740900.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Logging to a File

2007-10-24 Thread Suad AlShamsi

Thanks

Jan Kriesten wrote:

How can I log to a file using log4j?!



documentation is found here: http://slf4j.org/

there's a wrapped implementation for log4j.

regards, --- jan.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  




Re: Logging to a File

2007-10-24 Thread Jan Kriesten

> How can I log to a file using log4j?!

documentation is found here: http://slf4j.org/

there's a wrapped implementation for log4j.

regards, --- jan.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]