[jira] [Commented] (SOLR-2191) Change SolrException cstrs that take Throwable to default to alreadyLogged=false

2012-02-09 Thread James Dyer (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-2191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13204672#comment-13204672
 ] 

James Dyer commented on SOLR-2191:
--

With SOLR-3022 and SOLR-3032 complete, should this one be closed also?

 Change SolrException cstrs that take Throwable to default to 
 alreadyLogged=false
 

 Key: SOLR-2191
 URL: https://issues.apache.org/jira/browse/SOLR-2191
 Project: Solr
  Issue Type: Bug
Reporter: Mark Miller
Assignee: Mark Miller
 Fix For: 3.6, 4.0

 Attachments: SOLR-2191.patch


 Because of misuse, many exceptions are now not logged at all - can be painful 
 when doing dev. I think we should flip this setting and work at removing any 
 double logging - losing logging is worse (and it almost looks like we lose 
 more logging than we would get in double logging) - and bad 
 solrexception/logging patterns are proliferating.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] [Commented] (SOLR-2191) Change SolrException cstrs that take Throwable to default to alreadyLogged=false

2012-02-09 Thread Mark Miller (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-2191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13204686#comment-13204686
 ] 

Mark Miller commented on SOLR-2191:
---

Sure, makes sense to me.

 Change SolrException cstrs that take Throwable to default to 
 alreadyLogged=false
 

 Key: SOLR-2191
 URL: https://issues.apache.org/jira/browse/SOLR-2191
 Project: Solr
  Issue Type: Bug
Reporter: Mark Miller
Assignee: Mark Miller
 Fix For: 3.6, 4.0

 Attachments: SOLR-2191.patch


 Because of misuse, many exceptions are now not logged at all - can be painful 
 when doing dev. I think we should flip this setting and work at removing any 
 double logging - losing logging is worse (and it almost looks like we lose 
 more logging than we would get in double logging) - and bad 
 solrexception/logging patterns are proliferating.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] [Commented] (SOLR-2191) Change SolrException cstrs that take Throwable to default to alreadyLogged=false

2012-01-12 Thread David Smiley (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-2191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13185010#comment-13185010
 ] 

David Smiley commented on SOLR-2191:


I agree with Mark.  In code I write, I am always sure to tag on the old 
exception to a new one, assuming I need to throw a different exception, and I 
almost never log exceptions.  I let the top layers handle that.  Code that does 
otherwise has redundant logs which I find annoying.

 Change SolrException cstrs that take Throwable to default to 
 alreadyLogged=false
 

 Key: SOLR-2191
 URL: https://issues.apache.org/jira/browse/SOLR-2191
 Project: Solr
  Issue Type: Bug
Reporter: Mark Miller
Assignee: Erick Erickson
 Fix For: 3.6, 4.0

 Attachments: SOLR-2191.patch


 Because of misuse, many exceptions are now not logged at all - can be painful 
 when doing dev. I think we should flip this setting and work at removing any 
 double logging - losing logging is worse (and it almost looks like we lose 
 more logging than we would get in double logging) - and bad 
 solrexception/logging patterns are proliferating.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] [Commented] (SOLR-2191) Change SolrException cstrs that take Throwable to default to alreadyLogged=false

2012-01-12 Thread Yonik Seeley (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-2191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13185019#comment-13185019
 ] 

Yonik Seeley commented on SOLR-2191:


bq. Why? You just include the extra context in the exception that you throw.

I vaguely recall having issues (way in the past) with big multi-line exception 
messages.
Guess I'll have to wait and see how it works in practice.

 Change SolrException cstrs that take Throwable to default to 
 alreadyLogged=false
 

 Key: SOLR-2191
 URL: https://issues.apache.org/jira/browse/SOLR-2191
 Project: Solr
  Issue Type: Bug
Reporter: Mark Miller
Assignee: Erick Erickson
 Fix For: 3.6, 4.0

 Attachments: SOLR-2191.patch


 Because of misuse, many exceptions are now not logged at all - can be painful 
 when doing dev. I think we should flip this setting and work at removing any 
 double logging - losing logging is worse (and it almost looks like we lose 
 more logging than we would get in double logging) - and bad 
 solrexception/logging patterns are proliferating.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] [Commented] (SOLR-2191) Change SolrException cstrs that take Throwable to default to alreadyLogged=false

2012-01-12 Thread Erick Erickson (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-2191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13185023#comment-13185023
 ] 

Erick Erickson commented on SOLR-2191:
--

OK, this really breaks out into two parts. I've fixed the SolrException part in 
both 3.6 and trunk. I'll leave this part to Mark (he agrees) as far as dealing 
with ZooKeeper messages.

 Change SolrException cstrs that take Throwable to default to 
 alreadyLogged=false
 

 Key: SOLR-2191
 URL: https://issues.apache.org/jira/browse/SOLR-2191
 Project: Solr
  Issue Type: Bug
Reporter: Mark Miller
Assignee: Erick Erickson
 Fix For: 3.6, 4.0

 Attachments: SOLR-2191.patch


 Because of misuse, many exceptions are now not logged at all - can be painful 
 when doing dev. I think we should flip this setting and work at removing any 
 double logging - losing logging is worse (and it almost looks like we lose 
 more logging than we would get in double logging) - and bad 
 solrexception/logging patterns are proliferating.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] [Commented] (SOLR-2191) Change SolrException cstrs that take Throwable to default to alreadyLogged=false

2012-01-12 Thread Erick Erickson (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-2191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13185074#comment-13185074
 ] 

Erick Erickson commented on SOLR-2191:
--

One last comment. Let's move further discussion of this over to SOLR-3032 where 
I'll be putting up a first-cut today or tomorrow (hopefully).


 Change SolrException cstrs that take Throwable to default to 
 alreadyLogged=false
 

 Key: SOLR-2191
 URL: https://issues.apache.org/jira/browse/SOLR-2191
 Project: Solr
  Issue Type: Bug
Reporter: Mark Miller
Assignee: Mark Miller
 Fix For: 3.6, 4.0

 Attachments: SOLR-2191.patch


 Because of misuse, many exceptions are now not logged at all - can be painful 
 when doing dev. I think we should flip this setting and work at removing any 
 double logging - losing logging is worse (and it almost looks like we lose 
 more logging than we would get in double logging) - and bad 
 solrexception/logging patterns are proliferating.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] [Commented] (SOLR-2191) Change SolrException cstrs that take Throwable to default to alreadyLogged=false

2012-01-11 Thread Mark Miller (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-2191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13184299#comment-13184299
 ] 

Mark Miller commented on SOLR-2191:
---

The issue needs to be updated. I think the right approach is to remove logOnce. 

 Change SolrException cstrs that take Throwable to default to 
 alreadyLogged=false
 

 Key: SOLR-2191
 URL: https://issues.apache.org/jira/browse/SOLR-2191
 Project: Solr
  Issue Type: Bug
Reporter: Mark Miller
Assignee: Mark Miller
 Fix For: 3.6, 4.0

 Attachments: SOLR-2191.patch


 Because of misuse, many exceptions are now not logged at all - can be painful 
 when doing dev. I think we should flip this setting and work at removing any 
 double logging - losing logging is worse (and it almost looks like we lose 
 more logging than we would get in double logging) - and bad 
 solrexception/logging patterns are proliferating.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] [Commented] (SOLR-2191) Change SolrException cstrs that take Throwable to default to alreadyLogged=false

2012-01-11 Thread Erick Erickson (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-2191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13184417#comment-13184417
 ] 

Erick Erickson commented on SOLR-2191:
--


What does remove logOnce mean in this case? Remove the method, sure. But note 
that the log(...) methods at least set the 'logged' value. Should that variable 
be removed too in your opinion?

I think I favor just removing logOnce, and expanding the use of 'logged' in the 
log(...) methods to return if it's already set at the top. I really dislike the 
idea of trying to keep track of where an exception is *really* reported, there 
are just too many code paths.

If people want to let the upper layers handle reporting, they can wrap the 
exception in a SolrException and re-throw, optionally logging the error at that 
point. If they don't wrap the exception and *do* log it, it may be re-logged 
later but that's a personal problem that should be dealt with on a case-by-case 
basis.

Should anything be done with 3.6, i.e. deprecate whatever we decide so we can 
nuke it in 5.x?

I may well commit this and open up another JIRA for further work. SOLR-3022 
deals with this too. I'd like to consolidate all this by this weekend, any 
others out there?

 Change SolrException cstrs that take Throwable to default to 
 alreadyLogged=false
 

 Key: SOLR-2191
 URL: https://issues.apache.org/jira/browse/SOLR-2191
 Project: Solr
  Issue Type: Bug
Reporter: Mark Miller
Assignee: Erick Erickson
 Fix For: 3.6, 4.0

 Attachments: SOLR-2191.patch


 Because of misuse, many exceptions are now not logged at all - can be painful 
 when doing dev. I think we should flip this setting and work at removing any 
 double logging - losing logging is worse (and it almost looks like we lose 
 more logging than we would get in double logging) - and bad 
 solrexception/logging patterns are proliferating.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] [Commented] (SOLR-2191) Change SolrException cstrs that take Throwable to default to alreadyLogged=false

2012-01-11 Thread Mark Miller (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-2191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=1318#comment-1318
 ] 

Mark Miller commented on SOLR-2191:
---

bq. personal problem that should be dealt with on a case-by-case basis.

I think it's more of a project level problem - we have to decide how we want to 
handle logging and stick with it I think. It still seems the most sensible 
thing is to drop this logOnce concept entirely - logging should be handled at 
the fringes once the exception bubbles up.

bq. Should that variable be removed too in your opinion?

Yup - I think logged and logOnce should die die die.

 Change SolrException cstrs that take Throwable to default to 
 alreadyLogged=false
 

 Key: SOLR-2191
 URL: https://issues.apache.org/jira/browse/SOLR-2191
 Project: Solr
  Issue Type: Bug
Reporter: Mark Miller
Assignee: Erick Erickson
 Fix For: 3.6, 4.0

 Attachments: SOLR-2191.patch


 Because of misuse, many exceptions are now not logged at all - can be painful 
 when doing dev. I think we should flip this setting and work at removing any 
 double logging - losing logging is worse (and it almost looks like we lose 
 more logging than we would get in double logging) - and bad 
 solrexception/logging patterns are proliferating.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] [Commented] (SOLR-2191) Change SolrException cstrs that take Throwable to default to alreadyLogged=false

2012-01-11 Thread Yonik Seeley (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-2191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13184657#comment-13184657
 ] 

Yonik Seeley commented on SOLR-2191:


bq. I think it's more of a project level problem - we have to decide how we 
want to handle logging and stick with it I think.

There's not much of a choice is there?  Logging early isn't always possible 
since there is a lack of context (for logging and for deciding if it should be 
logged).  Logging last means your missing context for extra debugging info.  I 
guess that leaves us living with logging the same exception multiple times 
(since we don't know if it's already been logged).

 Change SolrException cstrs that take Throwable to default to 
 alreadyLogged=false
 

 Key: SOLR-2191
 URL: https://issues.apache.org/jira/browse/SOLR-2191
 Project: Solr
  Issue Type: Bug
Reporter: Mark Miller
Assignee: Erick Erickson
 Fix For: 3.6, 4.0

 Attachments: SOLR-2191.patch


 Because of misuse, many exceptions are now not logged at all - can be painful 
 when doing dev. I think we should flip this setting and work at removing any 
 double logging - losing logging is worse (and it almost looks like we lose 
 more logging than we would get in double logging) - and bad 
 solrexception/logging patterns are proliferating.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] [Commented] (SOLR-2191) Change SolrException cstrs that take Throwable to default to alreadyLogged=false

2012-01-11 Thread Mark Miller (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-2191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13184684#comment-13184684
 ] 

Mark Miller commented on SOLR-2191:
---

bq. Logging last means your missing context for extra debugging info.

Why? You just include the extra context in the exception that you throw.

bq. I guess that leaves us living with logging the same exception multiple times

I don't see why - I still think they should bubble up and get logged at the top.

 Change SolrException cstrs that take Throwable to default to 
 alreadyLogged=false
 

 Key: SOLR-2191
 URL: https://issues.apache.org/jira/browse/SOLR-2191
 Project: Solr
  Issue Type: Bug
Reporter: Mark Miller
Assignee: Erick Erickson
 Fix For: 3.6, 4.0

 Attachments: SOLR-2191.patch


 Because of misuse, many exceptions are now not logged at all - can be painful 
 when doing dev. I think we should flip this setting and work at removing any 
 double logging - losing logging is worse (and it almost looks like we lose 
 more logging than we would get in double logging) - and bad 
 solrexception/logging patterns are proliferating.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] [Commented] (SOLR-2191) Change SolrException cstrs that take Throwable to default to alreadyLogged=false

2012-01-06 Thread Sami Siren (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-2191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13181193#comment-13181193
 ] 

Sami Siren commented on SOLR-2191:
--

I also ran into this problem too (SOLR-3006).

b1. I have not forgot about this - just has gotten bigger with recent comments 
- perhaps we commit this first, then address the larger issue?

Sounds like a good start to me. The current situation where log messages can 
easily get lost is really annoying.




 Change SolrException cstrs that take Throwable to default to 
 alreadyLogged=false
 

 Key: SOLR-2191
 URL: https://issues.apache.org/jira/browse/SOLR-2191
 Project: Solr
  Issue Type: Bug
Reporter: Mark Miller
Assignee: Mark Miller
 Fix For: 3.6, 4.0

 Attachments: SOLR-2191.patch


 Because of misuse, many exceptions are now not logged at all - can be painful 
 when doing dev. I think we should flip this setting and work at removing any 
 double logging - losing logging is worse (and it almost looks like we lose 
 more logging than we would get in double logging) - and bad 
 solrexception/logging patterns are proliferating.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] [Commented] (SOLR-2191) Change SolrException cstrs that take Throwable to default to alreadyLogged=false

2012-01-06 Thread David Smiley (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-2191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13181362#comment-13181362
 ] 

David Smiley commented on SOLR-2191:


Yes please commit this for pete's sake!  This is one of those JIRA issues that 
has fallen through the cracks and nearly forgotten.

 Change SolrException cstrs that take Throwable to default to 
 alreadyLogged=false
 

 Key: SOLR-2191
 URL: https://issues.apache.org/jira/browse/SOLR-2191
 Project: Solr
  Issue Type: Bug
Reporter: Mark Miller
Assignee: Mark Miller
 Fix For: 3.6, 4.0

 Attachments: SOLR-2191.patch


 Because of misuse, many exceptions are now not logged at all - can be painful 
 when doing dev. I think we should flip this setting and work at removing any 
 double logging - losing logging is worse (and it almost looks like we lose 
 more logging than we would get in double logging) - and bad 
 solrexception/logging patterns are proliferating.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] [Commented] (SOLR-2191) Change SolrException cstrs that take Throwable to default to alreadyLogged=false

2011-05-03 Thread David Smiley (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-2191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13028240#comment-13028240
 ] 

David Smiley commented on SOLR-2191:


Ehh... I kind of like the notion but wether it is kept or not, I think a 
general error/exception strategy needs to be devised.  

In code I write, I tend to almost never log exceptions; I let them get to the 
highest possible point to ensure they are logged there once, which is usually 
one place.  Beforehand I might catch an exception to do a log.error() to 
provide some context and then rethrow the exception.  I also wrap with 
RuntimeExceptions.

An alternative is to log exceptions early (with contextual error message), and 
then rethrow but don't log it higher up (e.g. earlier up) the stack. But how 
can that early point know the exception has been handled?  It can't generically 
know making your suggestion of fix those code paths to be less chatty 
problematic. Perhaps our code will always assume that we logged an exception 
before wrapping it in SolrException right before we throw them. I think that's 
a reasonable policy and wouldn't require an alreadyLogged flag.

 Change SolrException cstrs that take Throwable to default to 
 alreadyLogged=false
 

 Key: SOLR-2191
 URL: https://issues.apache.org/jira/browse/SOLR-2191
 Project: Solr
  Issue Type: Bug
Reporter: Mark Miller
 Fix For: Next

 Attachments: SOLR-2191.patch


 Because of misuse, many exceptions are now not logged at all - can be painful 
 when doing dev. I think we should flip this setting and work at removing any 
 double logging - losing logging is worse (and it almost looks like we lose 
 more logging than we would get in double logging) - and bad 
 solrexception/logging patterns are proliferating.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

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



[jira] [Commented] (SOLR-2191) Change SolrException cstrs that take Throwable to default to alreadyLogged=false

2011-05-03 Thread Yonik Seeley (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-2191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13028246#comment-13028246
 ] 

Yonik Seeley commented on SOLR-2191:


bq. In code I write, I tend to almost never log exceptions; I let them get to 
the highest possible point to ensure they are logged there once, which is 
usually one place. Beforehand I might catch an exception to do a log.error() to 
provide some context and then rethrow the exception.

Right.  And logging immediately can be problematic since one may not know if 
it's really an error that should be logged since Exceptions can sometimes be 
handled (dismax is one example).

Anyway, certainly a +1 from me for changing the default of alreadyLogged and 
improving the strategy in general.

 Change SolrException cstrs that take Throwable to default to 
 alreadyLogged=false
 

 Key: SOLR-2191
 URL: https://issues.apache.org/jira/browse/SOLR-2191
 Project: Solr
  Issue Type: Bug
Reporter: Mark Miller
 Fix For: Next

 Attachments: SOLR-2191.patch


 Because of misuse, many exceptions are now not logged at all - can be painful 
 when doing dev. I think we should flip this setting and work at removing any 
 double logging - losing logging is worse (and it almost looks like we lose 
 more logging than we would get in double logging) - and bad 
 solrexception/logging patterns are proliferating.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

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



[jira] [Commented] (SOLR-2191) Change SolrException cstrs that take Throwable to default to alreadyLogged=false

2011-05-02 Thread Hoss Man (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-2191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13027915#comment-13027915
 ] 

Hoss Man commented on SOLR-2191:


Is anyone else interested in entertaining the notion that the alreadyLogged 
concept is more trouble then it's worth and we should just rip the whole damn 
thing out? (deprecate logOnce, etc...)

is there such a thing as logging an exception too much? and if there is, 
couldn't we fix those code paths to be less chatty? 

 Change SolrException cstrs that take Throwable to default to 
 alreadyLogged=false
 

 Key: SOLR-2191
 URL: https://issues.apache.org/jira/browse/SOLR-2191
 Project: Solr
  Issue Type: Bug
Reporter: Mark Miller
 Fix For: Next

 Attachments: SOLR-2191.patch


 Because of misuse, many exceptions are now not logged at all - can be painful 
 when doing dev. I think we should flip this setting and work at removing any 
 double logging - losing logging is worse (and it almost looks like we lose 
 more logging than we would get in double logging) - and bad 
 solrexception/logging patterns are proliferating.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

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



[jira] [Commented] (SOLR-2191) Change SolrException cstrs that take Throwable to default to alreadyLogged=false

2011-04-28 Thread David Smiley (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-2191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13026714#comment-13026714
 ] 

David Smiley commented on SOLR-2191:


Yes, lets do this!  I was just about to log a bug when I found it's already 
been reported.  I had some stupid error in my solr config and it never got 
logged. Because of the error, the core never got registered into the container. 
And then when I went to do any queries, Solr kept telling me I didn't specify a 
core name when I never had to before (using the default). I was in the twilight 
zone for a while.

Mark, you're a committer yet you supplied a patch.  Why didn't you simply 
commit it?  I heard on the dev list recently that Solr is supposedly CTR 
(commit then review), yet we clearly act here as RTC.  So even if RTC is it, 
wouldn't there be some threshold to let simple things like this through without 
a review?

 Change SolrException cstrs that take Throwable to default to 
 alreadyLogged=false
 

 Key: SOLR-2191
 URL: https://issues.apache.org/jira/browse/SOLR-2191
 Project: Solr
  Issue Type: Bug
Reporter: Mark Miller
 Fix For: Next

 Attachments: SOLR-2191.patch


 Because of misuse, many exceptions are now not logged at all - can be painful 
 when doing dev. I think we should flip this setting and work at removing any 
 double logging - losing logging is worse (and it almost looks like we lose 
 more logging than we would get in double logging) - and bad 
 solrexception/logging patterns are proliferating.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

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



[jira] [Commented] (SOLR-2191) Change SolrException cstrs that take Throwable to default to alreadyLogged=false

2011-04-28 Thread Mark Miller (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-2191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13026794#comment-13026794
 ] 

Mark Miller commented on SOLR-2191:
---

bq. Why didn't you simply commit it? I heard on the dev list recently that Solr 
is supposedly CTR (commit then review), yet we clearly act here as RTC. 

Depends really - on the change and on the committer. We like to keep trunk 
extra shiny, and I think our practice is good myself. But it's up to each 
committer.

bq. So even if RTC is it, wouldn't there be some threshold to let simple things 
like this through without a review?

Yes - and many small things are simply committed. Likely when I ran into this, 
I was doing other things - and I made a quick patch, but not something I was 
willing to stake my name on as a commit. I like to do a thorough review first. 
And then this just fell off my radar. Sometimes you are just not sure of all of 
the ramifications of your change - a lot of times this is a mini side track 
while I'm doing something else, and so it's nice to just toss up a patch and 
get feedback from the likes of Hossman and others before just cowboying on 
trunk. Again though - each situation is handled by each committer based on 
their level of comfort, and the general culture of the community.

Yeah, this bug is annoying - I'm happy to look at this again soon - I happen to 
be unusually busy at this time, but I'll certainly try to get this in by this 
weekend.

 Change SolrException cstrs that take Throwable to default to 
 alreadyLogged=false
 

 Key: SOLR-2191
 URL: https://issues.apache.org/jira/browse/SOLR-2191
 Project: Solr
  Issue Type: Bug
Reporter: Mark Miller
 Fix For: Next

 Attachments: SOLR-2191.patch


 Because of misuse, many exceptions are now not logged at all - can be painful 
 when doing dev. I think we should flip this setting and work at removing any 
 double logging - losing logging is worse (and it almost looks like we lose 
 more logging than we would get in double logging) - and bad 
 solrexception/logging patterns are proliferating.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

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



[jira] [Commented] (SOLR-2191) Change SolrException cstrs that take Throwable to default to alreadyLogged=false

2011-04-28 Thread Mark Miller (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-2191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13026799#comment-13026799
 ] 

Mark Miller commented on SOLR-2191:
---

Also keep in mind that Review-Then-Commit at Apache means you need consensus 
and 3 votes before committing I believe:

See

http://www.apache.org/foundation/glossary.html


Consensus Approval
'Consensus approval' refers to a vote (sense 1) which has completed with at 
least three binding +1 votes and no vetos. Compare .

Review-Then-Commit
(Often referenced as 'RTC' or 'R-T-C'.) Commit policy which requires that all 
changes receive consensus approval in order to be committed. Compare , and see 
the description of the voting process.

 Change SolrException cstrs that take Throwable to default to 
 alreadyLogged=false
 

 Key: SOLR-2191
 URL: https://issues.apache.org/jira/browse/SOLR-2191
 Project: Solr
  Issue Type: Bug
Reporter: Mark Miller
 Fix For: Next

 Attachments: SOLR-2191.patch


 Because of misuse, many exceptions are now not logged at all - can be painful 
 when doing dev. I think we should flip this setting and work at removing any 
 double logging - losing logging is worse (and it almost looks like we lose 
 more logging than we would get in double logging) - and bad 
 solrexception/logging patterns are proliferating.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

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



[jira] [Commented] (SOLR-2191) Change SolrException cstrs that take Throwable to default to alreadyLogged=false

2011-04-28 Thread Mark Miller (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-2191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13026798#comment-13026798
 ] 

Mark Miller commented on SOLR-2191:
---

Also keep in mind that Review-Then-Commit at Apache means you need consensus 
and 3 votes before committing I believe:

See

http://www.apache.org/foundation/glossary.html


Consensus Approval
'Consensus approval' refers to a vote (sense 1) which has completed with at 
least three binding +1 votes and no vetos. Compare .

Review-Then-Commit
(Often referenced as 'RTC' or 'R-T-C'.) Commit policy which requires that all 
changes receive consensus approval in order to be committed. Compare , and see 
the description of the voting process.

 Change SolrException cstrs that take Throwable to default to 
 alreadyLogged=false
 

 Key: SOLR-2191
 URL: https://issues.apache.org/jira/browse/SOLR-2191
 Project: Solr
  Issue Type: Bug
Reporter: Mark Miller
 Fix For: Next

 Attachments: SOLR-2191.patch


 Because of misuse, many exceptions are now not logged at all - can be painful 
 when doing dev. I think we should flip this setting and work at removing any 
 double logging - losing logging is worse (and it almost looks like we lose 
 more logging than we would get in double logging) - and bad 
 solrexception/logging patterns are proliferating.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

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



[jira] [Commented] (SOLR-2191) Change SolrException cstrs that take Throwable to default to alreadyLogged=false

2011-04-28 Thread David Smiley (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-2191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13026830#comment-13026830
 ] 

David Smiley commented on SOLR-2191:


Thanks for clarification on Review Then Commit (RTC); I verified through ASF's 
documentation that indeed three votes is necessary.  Wow, it'd take forever to 
get things done that way; it seems impractical for anything but perhaps 
security related code (e.g. crypto). I didn't see any info exceptions for 
minor changes (e.g. adding documentation, code formatting). I'm glad we don't 
do that officially.

I'm about to take the conversation further on the dev list RE jira issues 
falling through the cracks...

 Change SolrException cstrs that take Throwable to default to 
 alreadyLogged=false
 

 Key: SOLR-2191
 URL: https://issues.apache.org/jira/browse/SOLR-2191
 Project: Solr
  Issue Type: Bug
Reporter: Mark Miller
 Fix For: Next

 Attachments: SOLR-2191.patch


 Because of misuse, many exceptions are now not logged at all - can be painful 
 when doing dev. I think we should flip this setting and work at removing any 
 double logging - losing logging is worse (and it almost looks like we lose 
 more logging than we would get in double logging) - and bad 
 solrexception/logging patterns are proliferating.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

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