Hello,

I suppose I'm not the only one's trying to define custom priorities (TRACE,
ALWAYS, DEBUG2). It seems this is not as easy as I hoped it would be.

I've started with writing MyPriority (extending Priority as the javadoc says
you shoulds when enlarging the priority set). That already gave some
problems because the _INT fields have package scope. This seems like a
design flaw to me, since I'd like to access these fields in MyPriority (in
com.mycompany.util.logging package), but I managed to bypass via copy/paste
(or so I hope).

Now the next thing I do is writing MyCategory (extends Category) since I
need to add the methods trace(), always() and debug2(). I suppose I must
also implement getInstance() because otherwise I won't be able to create
MyCategory events. And then I have to write a MyHierarchy class since
getInstance() requires a hierarchy and who knows what other classes I'll
have to subclass and I won't even be sure that it will work so...

I start to suspect I'm not on the right track to add custom priorities.
Anyone every tried to add custom priorities?

G.
---------------
Geert Mergan
Java Developer
Email: [EMAIL PROTECTED]
Phone: +32-2-3571765

EuropeanInvestor.com
Lasne Business Park
Chaussée de Louvain 431, Building F
B-1380 Lasne
Phone: +32-2-3571711
Fax: +32-2-3571700
URL: http://www.europeaninvestor.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to