The moose likes Java in General and the fly likes Java logging API Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Java logging API" Watch "Java logging API" New topic

Java logging API

Dan McKay

Joined: Aug 19, 2007
Posts: 3

I have been reading an online tutorial about the Java Logging API.

I found the tutorial to be helpful, but I am having difficulty with the concept of the logger hierarchy:

Specifically, I have two classes, which I have placed in the same package:

The LoggingConfigClass, as the name suggests, configures a logger and a console handler. It displays both messages. This class works as I anticipated.

The LoggingTestClass has a logger, which has no explicit configuration. I want to take advantage of the logger hierarchy (it should behave in the same way as the logger in LoggingConfig class). This does not happen despite the fact that I have been careful about how I named the logger in each class (which I think is the deciding factor in using logging hieriarchy???).

Could somebody please point out where I have gone wrong...?

Bert Bates

Joined: Oct 14, 2002
Posts: 8898
moved to the intermediate forum...

Spot false dilemmas now, ask me how!
(If you're not on the edge, you're taking up too much room.)
I agree. Here's the link:
subject: Java logging API
It's not a secret anymore!