my dog learned polymorphism*
The moose likes JBoss/WildFly and the fly likes [JBoss 6.0.0 M2] Logging with org.jboss.logging.Logger or org.apache.log4j.Logger ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "[JBoss 6.0.0 M2] Logging with org.jboss.logging.Logger or org.apache.log4j.Logger ?" Watch "[JBoss 6.0.0 M2] Logging with org.jboss.logging.Logger or org.apache.log4j.Logger ?" New topic
Author

[JBoss 6.0.0 M2] Logging with org.jboss.logging.Logger or org.apache.log4j.Logger ?

Celinio Fernandes
Ranch Hand

Joined: Jun 28, 2003
Posts: 547

Hi,
I am wondering which class I should use to add logs in my web applications.

The classes org.jboss.logging.Logger and org.apache.log4j.Logger seem to have the same methods (error, fatal, info, debug ...).
I have been using the org.jboss.logging.Logger class for a long time but i am wondering how close it is to log4j.
Which one should i use ? Also, does org.jboss.logging.Logger use the log4j framework ? I presume it does.

Thanks for helping.


SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCBCD 5
Visit my blog
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5812
    
    7

Personally, I would use commons logging.

Also, could I request that you ask your question in only one forum and wait a reasonable time (2 or 3 of days) for an answer before asking in another forum? Duplication of effort gets annoying after a while.


JBoss In Action
Celinio Fernandes
Ranch Hand

Joined: Jun 28, 2003
Posts: 547

Peter Johnson wrote:Personally, I would use commons logging.

Also, could I request that you ask your question in only one forum and wait a reasonable time (2 or 3 of days) for an answer before asking in another forum? Duplication of effort gets annoying after a while.


Sure. Sorry about that.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: [JBoss 6.0.0 M2] Logging with org.jboss.logging.Logger or org.apache.log4j.Logger ?
 
Similar Threads
how reference the class org.apache.log4j via jboss logger
how to stop printing log in console?
EARs, logging and dependant jar files
inject log4j logger
Get all categories defined in log4j.xml