Re: Solr Logging

2008-05-04 Thread Grant Ingersoll


On May 3, 2008, at 4:22 PM, Ryan McKinley wrote:



If a large subset of the community is in favor of moving away from  
JUL

towards some alternative (and I'm not sure that's true),


Perhaps we should take a poll on solr-user?  On the dev list, I  
there are a few strong opinions, but I suspect most people don't  
really care (as long as it works).




a) Use it only if it's default behavior can be set to defer to the
   configured JUL LogManager (This is basicly mandatory in my
   opinion, since otherwise Solr won't be backwards compatible)


Absolutely -- the logging behavior in solr.war must be identical to  
how it behaved directly using JUL.  Any existing configurations must  
work without external modifications.


If we are unable to do this with SLF4J, I would change my +1 to a -1


Definitely agree.  Not only that, but I would say the performance has  
to be as good or better, too.







b) Note in our documentation that Solr's usage of this abstraction is
   experimental and may be changed in future releases (If we
   encounter problems with it or decide there is some *better*
   abstraction) and that configuring a JUL LogManager is the
   recommended way to recieve logging messages from Solr.



That sounds fine -- the Recommended way to use solr is with the  
released .war file.  This will use JUL by default.


I suggest the next step is to verify that (a) is true -- make a JIRA  
issue -- then ask solr-user how they feel about it...



Totally agree.


[jira] Updated: (SOLR-560) Convert JDK logging to SLF4J

2008-05-04 Thread Ryan McKinley (JIRA)

 [ 
https://issues.apache.org/jira/browse/SOLR-560?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ryan McKinley updated SOLR-560:
---

Attachment: SOLR-560-slf4j.patch

 Convert JDK logging to SLF4J
 

 Key: SOLR-560
 URL: https://issues.apache.org/jira/browse/SOLR-560
 Project: Solr
  Issue Type: Wish
Reporter: Ryan McKinley
 Fix For: 1.3

 Attachments: slf4j-api-1.5.0.jar, slf4j-jdk14-1.5.0.jar, 
 SOLR-560-slf4j.patch


 After lots of discussion, we should consider using SLF4j to enable more 
 flexibility in logging configuration.
 See:
 http://www.nabble.com/Solr-Logging-td16836646.html
 http://www.nabble.com/logging-through-log4j-td13747253.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (SOLR-560) Convert JDK logging to SLF4J

2008-05-04 Thread Ryan McKinley (JIRA)

 [ 
https://issues.apache.org/jira/browse/SOLR-560?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ryan McKinley updated SOLR-560:
---

Attachment: slf4j-jdk14-1.5.0.jar

 Convert JDK logging to SLF4J
 

 Key: SOLR-560
 URL: https://issues.apache.org/jira/browse/SOLR-560
 Project: Solr
  Issue Type: Wish
Reporter: Ryan McKinley
 Fix For: 1.3

 Attachments: slf4j-api-1.5.0.jar, slf4j-jdk14-1.5.0.jar, 
 SOLR-560-slf4j.patch


 After lots of discussion, we should consider using SLF4j to enable more 
 flexibility in logging configuration.
 See:
 http://www.nabble.com/Solr-Logging-td16836646.html
 http://www.nabble.com/logging-through-log4j-td13747253.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (SOLR-560) Convert JDK logging to SLF4J

2008-05-04 Thread Ryan McKinley (JIRA)

 [ 
https://issues.apache.org/jira/browse/SOLR-560?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ryan McKinley updated SOLR-560:
---

Attachment: slf4j-api-1.5.0.jar

 Convert JDK logging to SLF4J
 

 Key: SOLR-560
 URL: https://issues.apache.org/jira/browse/SOLR-560
 Project: Solr
  Issue Type: Wish
Reporter: Ryan McKinley
 Fix For: 1.3

 Attachments: slf4j-api-1.5.0.jar, slf4j-jdk14-1.5.0.jar, 
 SOLR-560-slf4j.patch


 After lots of discussion, we should consider using SLF4j to enable more 
 flexibility in logging configuration.
 See:
 http://www.nabble.com/Solr-Logging-td16836646.html
 http://www.nabble.com/logging-through-log4j-td13747253.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (SOLR-560) Convert JDK logging to SLF4J

2008-05-04 Thread Ryan McKinley (JIRA)

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

Ryan McKinley commented on SOLR-560:


I attached a quick patch to convert to SLF4j.  I have not fully tested to make 
sure the default behavior is the same as it was before, but a quick look at the 
example seems reasonable.

This changed:
  log.finest  - log.trace
  log.fine - log.debug
  log.warning - log.warn
  log.severe - log.error
  (info stays the same)

The only bit I was not sure how to translate is in SolrRequestParsers.java:
{code:java}
  log.throwing(getClass().getName(), getTransformer, tce);
{code}

for now, i just used:
{code:java}
 log.error( getClass().getName() +  getTransformer, tce );
{code}

Additionally, wherever I noticed it, I used slf4j style formatters:
http://www.slf4j.org/faq.html#logging_performance
but we may want to make a more through review 


 Convert JDK logging to SLF4J
 

 Key: SOLR-560
 URL: https://issues.apache.org/jira/browse/SOLR-560
 Project: Solr
  Issue Type: Wish
Reporter: Ryan McKinley
 Fix For: 1.3

 Attachments: slf4j-api-1.5.0.jar, slf4j-jdk14-1.5.0.jar, 
 SOLR-560-slf4j.patch


 After lots of discussion, we should consider using SLF4j to enable more 
 flexibility in logging configuration.
 See:
 http://www.nabble.com/Solr-Logging-td16836646.html
 http://www.nabble.com/logging-through-log4j-td13747253.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.