|
From: Trevor C. <pr...@se...> - 2003-09-28 14:30:21
|
I like that idea, but what name do we use for the log? A simple
"PageNotFound" name, or a packaged name like
"org.springframework.web.servlet.PageNotFound". I favor the latter since
you could also just have all the web stuff in a single log.
The other question is whether we create a marker interface to show that
we've used this name for logging?
Trevor
-----Original Message-----
From: Rod Johnson [mailto:rod...@in...]
Sent: September 28, 2003 4:02 AM
To: Trevor Cook; Spring Developers
Subject: Re: [Springframework-developer] DispatcherServlet - no mapping
found
Trevor,
On thinking it over further, making this an error was clearly a mistake.
Page not founds probably deserve their own logging category, so they could
be output completely separately from other messages.
Thoughts on this?
Regards,
Rod
----- Original Message -----
From: "Rod Johnson" <rod...@in...>
To: "Trevor Cook" <pr...@se...>; "Spring Developers"
<spr...@li...>
Sent: Saturday, September 27, 2003 10:18 PM
Subject: Re: [Springframework-developer] DispatcherServlet - no mapping
found
> Trevor,
>
> Sounds reasonable. I'm happy for you to change it.
>
> Regards,
> Rod
>
> ----- Original Message -----
> From: "Trevor Cook" <pr...@se...>
> To: "Spring Developers" <spr...@li...>
> Sent: Saturday, September 27, 2003 7:21 PM
> Subject: [Springframework-developer] DispatcherServlet - no mapping found
>
>
> > I have a bit of a problem with the DispatcherServlet's doService method,
> > specifically:
> >
> > if (mappedHandler == null || mappedHandler.getHandler() == null) {
> > // if we didn't find a handler
> > logger.error("No mapping for [" + WebUtils.getRequestUri(request) + "]
in
> > DispatcherServlet with name '" + getServletName() + "'");
> > response.sendError(HttpServletResponse.SC_NOT_FOUND);
> > return;
> > }
> >
> > I think the 404 is fine (I noticed the previous thread for multiaction
on
> > this - see
> http://sourceforge.net/mailarchive/message.php?msg_id=5986871).
> > My problem is "logger.error". I have log4j send me anything above info
> for
> > my code, and anything error/fatal for Spring. Because of this, I am
> > currently getting dozens of emails a day from spiders, spelling errors,
> and
> > 1 site that refuses to change a bad link on their page. I considered
> just
> > changing my logging to only report fatal errors from Spring, but Spring
> > doesn't have any, and other errors it reports are important (like
> > transaction and configuration problems). I'd like to change this from
> error
> > to warn. "warn" is defined as:
> >
> > <quote>other runtime situations that are undesirable or unexpected, but
> not
> > necessarily "wrong".</quote> see
> > http://jakarta.apache.org/commons/logging/userguide.html
> >
> > I think that a 404 is not a desirable thing, but is fairly normal for a
> > webapp, so falls under the "not wrong" category.
> >
> > Let me know if there is general support for lowering the logging level
of
> > this message, or if I'm totally out to lunch.
> >
> > Trevor D. Cook
> >
> >
> >
> > -------------------------------------------------------
> > This sf.net email is sponsored by:ThinkGeek
> > Welcome to geek heaven.
> > http://thinkgeek.com/sf
> > _______________________________________________
> > Springframework-developer mailing list
> > Spr...@li...
> > https://lists.sourceforge.net/lists/listinfo/springframework-developer
> >
>
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
|