On Thu, Jun 30, 2011 at 12:09 AM, Mike Frysinger <[email protected]> wrote:
> On Thursday, June 30, 2011 00:04:36 Jie Zhang wrote:
>> On Wed, Jun 29, 2011 at 11:41 PM, Mike Frysinger wrote:
>> > i wonder why we have this at all.  we already have urj_log_level_t
>> > declaring whether something is an error, a warning, or something else.
>> >  why are we manually adding "Error:" and "Warning:" prefixes to the
>> > logged strings ?  why cant urj_log() prefix things appropriately based
>> > on the level ?
>>
>> Imagine set the level to "all", but you still want to see an error
>> with "Error" prefix instead of "all" prefix.
>
> urj_log(lvl, ...) is the level at which the specified string should be logged.
> if you're logging an error, then you should be doing
> urj_log(URJ_LOG_LEVEL_ERROR, ...)
>
> when the level is set by the user, that is simply what what messages dont get
> displayed.  it doesnt affect the levels at which messages get called.
>
If it's true that user should always call urj_error_describe on
URJ_LOG_LEVEL_ERROR or URJ_LOG_LEVEL_WARNING, why adding an assert is
a bad idea?


Jie

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
UrJTAG-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/urjtag-development

Reply via email to