I got lost in the discussion. Can someone please clarify... Is the custom
logging interface a nice-to-have or a requirement of the system?

I was hoping simply someone could write this (pseudocode below):
logger.log(MyCustomLevels.LEVEL1, "message");

...so no different interface should be required, right? Can't someone just
pass in their log level directly without using one of the named-log-level
convenience methods?


On Sun, Jan 26, 2014 at 8:37 PM, Matt Sicker <boa...@gmail.com> wrote:

> Now Level can't be used in an annotation. Since it supports string names
> for levels, should I just use Level.toLevel?
>
>
> On 26 January 2014 19:55, Ralph Goers <ralph.go...@dslextreme.com> wrote:
>
>> I think I must be misunderstanding the part about “If those levels were
>> added…”.  I don’t understand how a level can be added to a class from the
>> config such that it is usable by a programmer at compile time.
>>
>> Ralph
>>
>> On Jan 26, 2014, at 5:24 PM, Scott Deboy <scott.de...@gmail.com> wrote:
>>
>> Couldn't we no-op instead of throw if the same identical level were
>> registered?
>>
>> If those levels were then added to the same custom level class from the
>> config, could we use that single class in the logger calls?
>>  On Jan 26, 2014 5:15 PM, "Ralph Goers" <ralph.go...@dslextreme.com>
>> wrote:
>>
>>> I am certain I could create a LevelPlugin that would allow you to define
>>> one or more Levels in the configuration, but to use that Level the user
>>> would have to code:
>>>
>>> logger.log(Level.toLevel(“DIAG”), “hello world”);
>>>
>>> In order to directly reference the level it has to be declared as a
>>> static from somewhere and it can only be instantiated a single time, so
>>> creating it from the configuration will prevent that.
>>>
>>> Ralph
>>>
>>> On Jan 26, 2014, at 4:03 PM, Scott Deboy <scott.de...@gmail.com> wrote:
>>>
>>> I have one goal: to remove my request for new built in levels by
>>> allowing the levels to be defined strictly via configuration. I agree there
>>> may be some hurdles but that's my goal.
>>>
>>> I'd like to avoid the requirement that users provide their own level
>>> implementation or use a different API.
>>>
>>> Scott
>>>
>>>>
>>>>
>>>
>>
>
>
> --
> Matt Sicker <boa...@gmail.com>
>



-- 
Cheers,
Paul

Reply via email to