> Is a logging framework where you want to implement an assertion mechanism?

Why not ?  There is no assert mechanism in Java (except manually testing a
condition and throwing a RuntimeException); having one implemented in log4j
doesn't seems a bad idea at first glance.

But the point is org.apache.log4j.Category.assert() is NOT an assert
mechanism despite its name. Either it is a misnomer or it is badly
implemented.

That's why I asked what is the purpose of this assert function.
Is there someone that is using it ?

ZC



> 
> -----Original Message-----
> From: Gino Marckx [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 21, 2001 8:57 AM
> To: 'LOG4J Users Mailing List'
> Subject: RE: Category.assert() disappointing
> 
> 
> 
> But shouldn't it in fact be FATAL and quit?
> I think Zart has a point...  At least the logging level should be FATAL...
> 
> Gino. 
> 
>> -----Original Message-----
>> From: Hansen, Richard [ mailto:[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]> ]
>> Sent: Thursday, June 21, 2001 3:53 PM
>> To: 'LOG4J Users Mailing List'
>> Subject: RE: Category.assert() disappointing
>> 
>> 
>> Here is what the javadoc says about Category.assert():
>> 
>> "If assertion parameter is false, then logs msg as an error statement."
>> 
>> So I guess I would not have expected it to halt ny application.
>> 
>>> -----Original Message-----
>>> From: Zart Colwing [ mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> ]
>>> Sent: Thursday, June 21, 2001 8:16 AM
>>> To: LOG4J Users Mailing List
>>> Subject: Category.assert() disappointing
>>> 
>>> 
>>> I'm disappointed by the Category.assert() function.
>>> 
>>> It was my belief that when an assert breaks that means that
>>> the conditions 
>>> for the safe continuation of the program execution are not
>>> meet and it is 
>>> better to halt the program right away before running into big
>>> troubles. 
>>> 
>>> Category.assert() obviously doesn't live by the same
>>> interpretation because
>>> it never tries to halt the faulty program in any way, shape or form.
>>> For me Category.assert() is just a way to log at ERROR level,
>>> not even at 
>>> FATAL level as one could at least expect !
>>> 
>>> I'm just asking if it is intentional and if yes why so ?
>>> 
>>> 
>>> Tanks 
>>> ZC 
>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


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

Reply via email to