[jira] Updated: (ZOOKEEPER-850) Switch from log4j to slf4j

2010-11-10 Thread Olaf Krische (JIRA)

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

Olaf Krische updated ZOOKEEPER-850:
---

Release Note: 
* replaces log4j with slf4j code (also in contrib for bookkeeper, 
zooinspector,rest,loggraph), added slf4j dependencies into several ivy.xml files
* you must add slf4j-api-1.6.1.jar and slf4j-log4j12-1.6.1.jar (bridge from 
sl4j to log4j) to the classpath, if not using the standard scripts
* log4j remains as the final logger yet. Therefore there is still  work to do: 
remove programmatic access to the log4j from certain classes (which add 
appenders or configure log4j at runtime), or move them to contrib



  was:
introduces indirection for logging via slf4j-api. adding bridge from slf4j to 
log4j implementation.

1) added slf4j dependency in ivy.xml

2) replaced:
- import org.apache.log4j.Logger with org.slf4j.Logger,LoggerFactory
- org.apache.log4j.Logger with org.slf4j.Logger
- org.apache.log4j.Logger.getLogger with org.slf4j.LoggerFactory.getLogger

3) replaced log.fatal with log.error, slf4j api has no log.fatal, faq 
recommends log.error

4) fixed logging requests, like log.error(object) with 
log.error(String.valueOf(object)) to match slf4j api

5) removed direct log4j-api access from 
org.apache.bookkeeper.util.LocalBookKeeper in contrib.
it added programmatically a console appender to the existing logger in the 
constructor. this can be done anytime via log4j.properties (which had by 
default INFO,CONSOLE anyways)


 Switch from log4j to slf4j
 --

 Key: ZOOKEEPER-850
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-850
 Project: Zookeeper
  Issue Type: Improvement
  Components: java client
Affects Versions: 3.3.1
Reporter: Olaf Krische
Assignee: Olaf Krische
 Fix For: 3.4.0

 Attachments: ZOOKEEPER-3.3.1-log4j-slf4j-20101031.patch.bz2, 
 ZOOKEEPER-3.4.0-log4j-slf4j-20101102.patch.bz2, ZOOKEEPER-850.patch


 Hello,
 i would like to see slf4j integrated into the zookeeper instead of relying 
 explicitly on log4j.
 slf4j is an abstract logging framework. There are adapters from slf4j to many 
 logger implementations, one of them is log4j.
 The decision which log engine to use i dont like to make so early.
 This would help me to embed zookeeper in my own applications (which use a 
 different logger implemenation, but slf4j is the basis)
 What do you think?
 (as i can see, those slf4j request flood all other projects on apache as well 
 :-)
 Maybe for 3.4 or 4.0?
 I can offer a patchset, i have experience in such an migration already. :-)

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



[jira] Updated: (ZOOKEEPER-850) Switch from log4j to slf4j

2010-11-10 Thread Olaf Krische (JIRA)

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

Olaf Krische updated ZOOKEEPER-850:
---

Release Note: 
* replaces log4j with slf4j code (also in contrib for bookkeeper, 
zooinspector,rest,loggraph), added slf4j dependencies into several ivy.xml files
* you must add slf4j-api-1.6.1.jar and slf4j-log4j12-1.6.1.jar (bridge from 
sl4j to log4j) to the classpath, if not using the standard scripts
* log4j remains as the final logger yet, there is still work to do: remove 
programmatic access to the log4j from certain classes (which add appenders or 
configure log4j at runtime), or move them to contrib



  was:
* replaces log4j with slf4j code (also in contrib for bookkeeper, 
zooinspector,rest,loggraph), added slf4j dependencies into several ivy.xml files
* you must add slf4j-api-1.6.1.jar and slf4j-log4j12-1.6.1.jar (bridge from 
sl4j to log4j) to the classpath, if not using the standard scripts
* log4j remains as the final logger yet. Therefore there is still  work to do: 
remove programmatic access to the log4j from certain classes (which add 
appenders or configure log4j at runtime), or move them to contrib




 Switch from log4j to slf4j
 --

 Key: ZOOKEEPER-850
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-850
 Project: Zookeeper
  Issue Type: Improvement
  Components: java client
Affects Versions: 3.3.1
Reporter: Olaf Krische
Assignee: Olaf Krische
 Fix For: 3.4.0

 Attachments: ZOOKEEPER-3.3.1-log4j-slf4j-20101031.patch.bz2, 
 ZOOKEEPER-3.4.0-log4j-slf4j-20101102.patch.bz2, ZOOKEEPER-850.patch


 Hello,
 i would like to see slf4j integrated into the zookeeper instead of relying 
 explicitly on log4j.
 slf4j is an abstract logging framework. There are adapters from slf4j to many 
 logger implementations, one of them is log4j.
 The decision which log engine to use i dont like to make so early.
 This would help me to embed zookeeper in my own applications (which use a 
 different logger implemenation, but slf4j is the basis)
 What do you think?
 (as i can see, those slf4j request flood all other projects on apache as well 
 :-)
 Maybe for 3.4 or 4.0?
 I can offer a patchset, i have experience in such an migration already. :-)

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



[jira] Updated: (ZOOKEEPER-850) Switch from log4j to slf4j

2010-11-10 Thread Olaf Krische (JIRA)

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

Olaf Krische updated ZOOKEEPER-850:
---

Release Note: 
* replaces log4j with slf4j code (also in contrib for bookkeeper, 
zooinspector,rest,loggraph), added slf4j dependencies into several ivy.xml files
* you must add slf4j-api-1.6.1.jar and slf4j-log4j12-1.6.1.jar (bridge from 
sl4j to log4j) to the classpath, if not using the standard scripts
* log4j remains as the final logger yet, there is still work to do: remove 
programmatic access to the log4j api from certain classes (which add appenders 
or configure log4j at runtime), or move them to contrib



  was:
* replaces log4j with slf4j code (also in contrib for bookkeeper, 
zooinspector,rest,loggraph), added slf4j dependencies into several ivy.xml files
* you must add slf4j-api-1.6.1.jar and slf4j-log4j12-1.6.1.jar (bridge from 
sl4j to log4j) to the classpath, if not using the standard scripts
* log4j remains as the final logger yet, there is still work to do: remove 
programmatic access to the log4j from certain classes (which add appenders or 
configure log4j at runtime), or move them to contrib




 Switch from log4j to slf4j
 --

 Key: ZOOKEEPER-850
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-850
 Project: Zookeeper
  Issue Type: Improvement
  Components: java client
Affects Versions: 3.3.1
Reporter: Olaf Krische
Assignee: Olaf Krische
 Fix For: 3.4.0

 Attachments: ZOOKEEPER-3.3.1-log4j-slf4j-20101031.patch.bz2, 
 ZOOKEEPER-3.4.0-log4j-slf4j-20101102.patch.bz2, ZOOKEEPER-850.patch


 Hello,
 i would like to see slf4j integrated into the zookeeper instead of relying 
 explicitly on log4j.
 slf4j is an abstract logging framework. There are adapters from slf4j to many 
 logger implementations, one of them is log4j.
 The decision which log engine to use i dont like to make so early.
 This would help me to embed zookeeper in my own applications (which use a 
 different logger implemenation, but slf4j is the basis)
 What do you think?
 (as i can see, those slf4j request flood all other projects on apache as well 
 :-)
 Maybe for 3.4 or 4.0?
 I can offer a patchset, i have experience in such an migration already. :-)

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



[jira] Updated: (ZOOKEEPER-850) Switch from log4j to slf4j

2010-11-01 Thread Olaf Krische (JIRA)

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

Olaf Krische updated ZOOKEEPER-850:
---

Attachment: ZOOKEEPER-3.4.0-log4j-slf4j-20101102.patch.bz2

Release-Notes: 

- replaces as far as possible the log4j with slf4j code (also in contrib for 
bookkeeper, zooinspector,rest,loggraph)
- you must add slf4j-api-1.6.1jar and slf4j-log4j12-1.6.1 to the classpath!
- log4j remains as the final logger, some code still depends directly on it 
(there is work to do...)


 Switch from log4j to slf4j
 --

 Key: ZOOKEEPER-850
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-850
 Project: Zookeeper
  Issue Type: Improvement
  Components: java client
Affects Versions: 3.3.1
Reporter: Olaf Krische
Assignee: Olaf Krische
 Fix For: 3.4.0

 Attachments: ZOOKEEPER-3.3.1-log4j-slf4j-20101031.patch.bz2, 
 ZOOKEEPER-3.4.0-log4j-slf4j-20101102.patch.bz2


 Hello,
 i would like to see slf4j integrated into the zookeeper instead of relying 
 explicitly on log4j.
 slf4j is an abstract logging framework. There are adapters from slf4j to many 
 logger implementations, one of them is log4j.
 The decision which log engine to use i dont like to make so early.
 This would help me to embed zookeeper in my own applications (which use a 
 different logger implemenation, but slf4j is the basis)
 What do you think?
 (as i can see, those slf4j request flood all other projects on apache as well 
 :-)
 Maybe for 3.4 or 4.0?
 I can offer a patchset, i have experience in such an migration already. :-)

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



[jira] Updated: (ZOOKEEPER-850) Switch from log4j to slf4j

2010-10-31 Thread Olaf Krische (JIRA)

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

Olaf Krische updated ZOOKEEPER-850:
---

Affects Version/s: 3.3.1
 Release Note: 
introduces indirection for logging via slf4j-api. adding bridge from slf4j to 
log4j implementation.

1) added slf4j dependency in ivy.xml

2) replaced:
- import org.apache.log4j.Logger with org.slf4j.Logger,LoggerFactory
- org.apache.log4j.Logger with org.slf4j.Logger
- org.apache.log4j.Logger.getLogger with org.slf4j.LoggerFactory.getLogger

3) replaced log.fatal with log.error, slf4j api has no log.fatal, faq 
recommends log.error

4) fixed logging requests, like log.error(object) with 
log.error(String.valueOf(object)) to match slf4j api

5) removed direct log4j-api access from 
org.apache.bookkeeper.util.LocalBookKeeper in contrib.
it added programmatically a console appender to the existing logger in the 
constructor. this can be done anytime via log4j.properties (which had by 
default INFO,CONSOLE anyways)
   Status: Patch Available  (was: Open)

So, in a way, i didnt change much. All what is required now is to have those 
two extra slf4j-jars in the classpath. Then it should run as always. Even if 
there is still a mistake, since log4j is still there, all should work as always.

The org.apache.zookeeper.jmx.ManagedUtil has to go away. Why not as an extra 
utility in contrib? It manages log4j by jmx. So therefore it requires log4j. I 
didnt wanna do a structural change.

You can remove log4j from ivy, then you will see the last dependencies, when 
building.

ant test tar went thru without a problem.

 Switch from log4j to slf4j
 --

 Key: ZOOKEEPER-850
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-850
 Project: Zookeeper
  Issue Type: Improvement
  Components: java client
Affects Versions: 3.3.1
Reporter: Olaf Krische

 Hello,
 i would like to see slf4j integrated into the zookeeper instead of relying 
 explicitly on log4j.
 slf4j is an abstract logging framework. There are adapters from slf4j to many 
 logger implementations, one of them is log4j.
 The decision which log engine to use i dont like to make so early.
 This would help me to embed zookeeper in my own applications (which use a 
 different logger implemenation, but slf4j is the basis)
 What do you think?
 (as i can see, those slf4j request flood all other projects on apache as well 
 :-)
 Maybe for 3.4 or 4.0?
 I can offer a patchset, i have experience in such an migration already. :-)

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



[jira] Commented: (ZOOKEEPER-850) Switch from log4j to slf4j

2010-08-23 Thread Olaf Krische (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-850?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12901518#action_12901518
 ] 

Olaf Krische commented on ZOOKEEPER-850:


Hello,

if you still use the log4j logger at runtime, then it should have no impact on 
the logging output, since those definitions in log4j.properties for log4j 
remain valid.

1) 

Add slf4j-api-1.5.10.jar, its the API for slf4j

2) 

For $clazz, replace:

  final static org.apache.log4j.Logger = 
org.apache.log4j.Logger.getLogger($clazz);

with

  final static org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger($clazz);

This must compile, then zookeeper is independend from log4j.

3) 

For runtime, e.g. testing, decide which logger to use. For log4j, you would 
just add:

- slf4j-log4j12-1.5.10.jar, the adapter from slf4j to log4j
- log4j-1.2.15.jar for log4j, which should already be defined in ant

This would be all. 

(patchset is not so easy as i thought, since zookeeper use its very own file 
structure, i dont even get 3.3.1 with a normal ant compile to work) :P


 Switch from log4j to slf4j
 --

 Key: ZOOKEEPER-850
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-850
 Project: Zookeeper
  Issue Type: Improvement
  Components: java client
Reporter: Olaf Krische

 Hello,
 i would like to see slf4j integrated into the zookeeper instead of relying 
 explicitly on log4j.
 slf4j is an abstract logging framework. There are adapters from slf4j to many 
 logger implementations, one of them is log4j.
 The decision which log engine to use i dont like to make so early.
 This would help me to embed zookeeper in my own applications (which use a 
 different logger implemenation, but slf4j is the basis)
 What do you think?
 (as i can see, those slf4j request flood all other projects on apache as well 
 :-)
 Maybe for 3.4 or 4.0?
 I can offer a patchset, i have experience in such an migration already. :-)

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



[jira] Commented: (ZOOKEEPER-787) groupId in deployed pom is wrong

2010-08-16 Thread Olaf Krische (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12898918#action_12898918
 ] 

Olaf Krische commented on ZOOKEEPER-787:


checked with 3.3.1 and works for me.

thank you!

 groupId in deployed pom is wrong
 

 Key: ZOOKEEPER-787
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-787
 Project: Zookeeper
  Issue Type: Bug
Affects Versions: 3.3.1
Reporter: Chris Conrad
Priority: Blocker
 Fix For: 3.3.2, 3.4.0


 The pom deployed to repo1.maven.org has the project declared like this:
 groupIdorg.apache.zookeeper/groupId
 artifactIdzookeeper/artifactId
 packagingjar/packaging
 version3.3.1/version
 But it is deployed here: 
 http://repo2.maven.org/maven2/org/apache/hadoop/zookeeper/3.3.1
 So either the groupId needs to change or the location it is deployed to needs 
 to be changed because having them different results in bad behavior.  If you 
 specify the correct groupId in your own pom/ivy files you can't even download 
 zookeeper because it's not where your pom says it is and if you use the 
 incorrect groupId then you can download zookeeper but then ivy complains 
 about:
 [error] :: problems summary ::
 [error]  ERRORS
 [error]   public: bad organisation found in 
 http://repo1.maven.org/maven2/org/apache/hadoop/zookeeper/3.3.1/zookeeper-3.3.1.pom:
  expected='org.apache.hadoop' found='org.apache.zookeeper'

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



[jira] Updated: (ZOOKEEPER-850) Switch from log4j to slf4j

2010-08-16 Thread Olaf Krische (JIRA)

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

Olaf Krische updated ZOOKEEPER-850:
---

Description: 
Hello,

i would like to see slf4j integrated into the zookeeper instead of relying 
explicitly on log4j.

slf4j is an abstract logging framework. There are adapters from slf4j to many 
logger implementations, one of them is log4j.

The decision which log engine to use i dont like to make so early.

This would help me to embed zookeeper in my own applications (which use a 
different logger implemenation, but slf4j is the basis)

What do you think?

(as i can see, those slf4j request flood all other projects on apache as well 
:-)

Maybe for 3.4 or 4.0?

I can offer a patchset, i have experience in such an migration already. :-)

  was:
Hello,

i would like to see slf4j integrated into the zookeeper instead of relying 
explicitly on log4j.

slf4j is an abstract logging framework. There are adapters from slf4j to many 
logger implementations, one of them is log4j.

The decision which log engine to use i like not make so early.

This would help me to embed zookeeper in my own applications (which use a 
different logger implemenation, but slf4j is the basis)

What do you think?

(as i can see, those slf4j request flood all other projects on apache as well 
:-)

Maybe for 3.4 or 4.0?

I can offer a patchset, i have experience in such an migration already. :-)


 Switch from log4j to slf4j
 --

 Key: ZOOKEEPER-850
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-850
 Project: Zookeeper
  Issue Type: Improvement
  Components: java client
Reporter: Olaf Krische

 Hello,
 i would like to see slf4j integrated into the zookeeper instead of relying 
 explicitly on log4j.
 slf4j is an abstract logging framework. There are adapters from slf4j to many 
 logger implementations, one of them is log4j.
 The decision which log engine to use i dont like to make so early.
 This would help me to embed zookeeper in my own applications (which use a 
 different logger implemenation, but slf4j is the basis)
 What do you think?
 (as i can see, those slf4j request flood all other projects on apache as well 
 :-)
 Maybe for 3.4 or 4.0?
 I can offer a patchset, i have experience in such an migration already. :-)

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



[jira] Created: (ZOOKEEPER-850) Switch from log4j to slf4j

2010-08-16 Thread Olaf Krische (JIRA)
Switch from log4j to slf4j
--

 Key: ZOOKEEPER-850
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-850
 Project: Zookeeper
  Issue Type: Improvement
  Components: java client
Reporter: Olaf Krische


Hello,

i would like to see slf4j integrated into the zookeeper instead of relying 
explicitly on log4j.

slf4j is an abstract logging framework. There are adapters from slf4j to many 
logger implementations, one of them is log4j.

The decision which log engine to use i like not make so early.

This would help me to embed zookeeper in my own applications (which use a 
different logger implemenation, but slf4j is the basis)

What do you think?

(as i can see, those slf4j request flood all other projects on apache as well 
:-)

Maybe for 3.4 or 4.0?

I can offer a patchset, i have experience in such an migration already. :-)

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