bugPHP::PRINT::IPP - Bugs: bug #35617, Log level interpretation is...

 
 

bug #35617: Log level interpretation is reversed

Submitted by:  None
Submitted on:  Fri 24 Feb 2012 08:51:24 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Thomas Harding <harding>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 01 Mar 2012 05:15:26 PM UTC, comment #5:

You're obviously right!

In fact, I didn't take a look for years in this code.

I apply your correction "by hand".

Next step for me is to re-handle all logging-debugging in a consistent maneer!

Thomas Harding <harding>
Project AdministratorIn charge of this item.
Wed 29 Feb 2012 08:46:19 PM UTC, comment #4:

Hi,

I'm just saying that the comparison is inverted to obtain the effect you have yourself documented.

There is something I do not understand in what you've said before :

You say ["log level numbers" increases with criticity], but in fact you call _errorLog with level 3 for successful jobs, and level 1 for failures :

Seen in BasicIPP.php and elsewhere :

In BasicIPP.php, you wrote this :
and this in the error_log function :
In effect, the more log_level is high ("very verbose"), the less messages will be logged. Not what your code-doc explains.

To be very verbose with log_level 3, we have to write things as in my patch, so messages of level 1,2 and 3 will be logged.
With log_level 1 (less verbose), a message with level 2 or 3 will not be logged as the _errorLog function will end on the early return, etc...

So ?...

Marsaud <marsaud>
Wed 29 Feb 2012 06:35:30 PM UTC, comment #3:

Hi, Marsaud !

Here is your patch:

Would you explain me, after your patch, in what way a message with $level > the-defined-log-level-until-nothing-has-to-be-logged will pass through the "return;"?

Anyway, my code is a nightmare and I think I will rewrite all that stuff with braces and standard formatting (I guess Pear) and handle all the error, log and debug stuff in a better maneer (std php constants, etc).

Thomas Harding <harding>
Project AdministratorIn charge of this item.
Tue 28 Feb 2012 08:10:37 AM UTC, comment #2:

Hello,

First, excuse me for being anonymous at first.

Second : there is nothing stupid in your log level managment, and I make no confusion with php logging.
But it is written inverted.

You say yourself "only messages with priority-n > "log-level" are "logged", but you have written the contrary in your BasicIPP::_errorLog() method, as seen in the patch I joined.

I will find a little time today to re-submit it properly in the patch section.

Best regards.

Marsaud <marsaud>
Fri 24 Feb 2012 08:14:09 PM UTC, comment #1:

As all stuff designed, "log level" has nothing to do with
php log level, and "log level numbers" increases with criticity,
so, only messages with priority-n > "log-level" are "logged".

I know it's merely stupid :)

It's up to you to submit a /complete/ patch as "unified" format (3 lines context) as with "diff -u" /from cvs head/ and /not re-formatted/ (or, at your will, entirely as gnu-C formatting)

get CVS:
cvs -z3 -d:pserver:anonymous@cvs.savannah.nongnu.org:/sources/phpprintipp co phpprintipp

Thomas Harding <harding>
Project AdministratorIn charge of this item.
Fri 24 Feb 2012 08:51:24 AM UTC, original submission:

See patch in joined document

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #25154:  BasicIPP.php.patch added by None (433B - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by marsaud (Posted a comment)
  • -unavailable- added by harding (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 01 Mar 2012 05:15:26 PM UTChardingStatusWont Fix=>Fixed
    Fri 24 Feb 2012 08:14:09 PM UTChardingStatusNone=>Wont Fix
      Assigned toNone=>harding
      Open/ClosedOpen=>Closed
    Fri 24 Feb 2012 08:51:24 AM UTCNoneAttached File-=>Added BasicIPP.php.patch, #25154

    Back to the top


    Powered by Savane 3.1-cleanup1