From: Erik W. S. <er...@se...> - 2002-09-07 10:20:12
|
Enjoy. Changes for this one: 1. FOO_INT now use the same integer value from log4j (although they're not exported... yet :). 2. Rather than go through some convoluded mapping to get things in the order we want, I reversed a couple greater than / less thans, so the order goes the way we want. Still somewhat hard to grok, but if you write things like: DEBUG > INFO > WARN > ERROR > FATAL it starts to make sense. Kinda. 3. Added check (and test) to make sure create_custom_level is called before init(). 4. Created test that cust_prio doesn't already exist. FYI, if you do the following: foreach (1 .. 15) { create_custom_level("FOO$_", "DEBUG"); } it'll fail at 15. So I made a blurb that roughly describes how to allocate things manually in a binary tree style to get 15 levels between two. Still don't think anyone will go there, but who knows. Also put in a test for both cases. :) What I didn't do: - I left create_custom_level in Logger for the time being. I wanted to get the rest into CVS before I start that, as it wasn't as trivial as I thought to move. Cheers, -e Msc...@ao... wrote: > In a message dated 9/5/02 8:28:12 PM Pacific Daylight Time, > er...@se... writes: > > >> Did one of you guys check in the patch? I'll make the above changes, >> just wanted to know from which repository to work from. :) > > > > Haven't integrated it yet -- please feel free to work off the current > CVS. > > -- Mike |