bugGPSD - Bugs: bug #44603, gpsd/syslog log levels mismatch

 
 

bug #44603: gpsd/syslog log levels mismatch

Submitted by:  Zbigniew Chyla <zchyla_nokia>
Submitted on:  Sun 22 Mar 2015 07:59:05 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Sun 22 Mar 2015 07:59:05 PM UTC, original submission:

The gpsd calls syslog() (from gpsd_vlog), setting syslog's log level to LOG_ERR only for gpsd's LOG_SHOUT. All other log levels, including LOG_ERROR, are mapped to syslog's LOG_NOTICE.

The expected behaviour would be mapping LOG_ERROR to LOG_ERR.

It looks like the mismatch was introduced as a side effect of f258275 - numeric value of LOG_ERROR was changed from 0 to -1, but other ocurrences of loglevel 0 were not updated accordingly, like this one:

syslog((errlevel == 0) ? LOG_ERR : LOG_NOTICE, "%s", outbuf);

As a first step, I attached a patch that replaces numeric loglevel 0 with its symbolic name, so that we can clearly see the problem:

The next step depends on the desired behaviour. Problably LOG_SHOUT should be replaced with LOG_ERROR in assignments and comparison.

Zbigniew Chyla <zchyla_nokia>

 

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

Attach File(s):
   
   
Comment:
   

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by esr (Updated the item)
  • -unavailable- added by zchyla_nokia (Submitted the item)
  •  

    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 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 03 Jun 2015 02:13:54 PM UTCesrOpen/ClosedOpen=>Closed
    Sun 22 Mar 2015 09:24:05 PM UTCesrStatusNone=>Fixed
    Sun 22 Mar 2015 07:59:05 PM UTCzchyla_nokiaAttached File-=>Added 0001-Use-LOG_-symbol-when-setting-comparing-log-level.patch, #33423

    Back to the top


    Powered by Savane 3.1-cleanup1