Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Why does FrontMan uses Commons-Logging and what is this?

 
Robert Krieg
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys

I try to use Bear Bibeaults lovely FrontMan Framework. When I tried to start it, I had a ClassNotFoundException, because it didn't find some "Commons Logging" thing.

I found this commons-logging jar-thing in the web and put it in my /lib.

Now it works but my question is:

Why does Frontman use this?
What does Commons Logging do?
Why isn't this included to tomcat?

Thank you and greetings from Robert
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Commons Logging is an abstraction layer for logging libraries. The most common logging implementations are java.util.logging and log4j, but there are others as well. If you ever want to switch your code from using one to the other, you'll find that you need to touch most source files. Commons Logging abstracts that away, and lets you configure which logging implementation to use with a properties file - no source changes required.

It's widely used, although apparently Tomcat doesn't use it.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64827
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Exactly. I didn't want to force anyone to have to use Log4J (my preference), so commons logging let's you use the java.util.logging package if you prefer.

Since the source is included, you can go in and remove/comment-out the logging statements if you'd rather not have to include the commons jar.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64827
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
P.S. That is the only external dependency that FrontMan has.
 
Robert Krieg
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Okay. I was just scared that my tomcat installation isn't correctly set up because the Frontman API says there are no external things needed.

But everythings runs fine now

Thank you
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64827
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Robert Krieg:
Okay. I was just scared that my tomcat installation isn't correctly set up because the Frontman API says there are no external things needed.
Hmmm. I'll have to check that. I thought certain I had updated that...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic