Log *THIS*

12 Dec

I was a rather dis-spirited on java a couple of days ago when trying to get log4j working with a small test program at the command line (rather than app server) level. Nothing was working, I didn’t understand why and the world was a very dark and unfriendly place.

Started fresh today and realized that there’s a lot more to setting up log4j than just getting the jar file in your CLASSPATH. I had to create the log4j.properties file and put it in a directory visible to the CLASSPATH. I now have my very on ‘conf’ directory which is the proud container for my log4j.properties.


Granted, it’s just a simple tutorial app to spit out a few lines on demand, but still, WHAT A FEELING!

Soon, I’ll be able to  tail -f  and watch my mistakes scroll by at lightning speed. Now THAT is going to be cool. I may give up all my other hobbies at that point. Parsing through my own prodigious output is going to be just too much fun!

(Waitaminute…did that sound a little off to anyone else, or is it just me?  Anyways…)

I also learned a bit more about Java packages today, from the Big Java book. Learned a lot more about why they are named the way they are.

Things like:


…are now actually beginning to make sense. I create my own packages now based on my email as suggested by the book:


Whaddya think? You’ve got to admit, that’s some package I’ve got there!




Comments are welcome!

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: