Anonymous | Login | 2025-01-22 18:53 UTC |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||
ID | Category | Severity | Type | Date Submitted | Last Update | ||
0001033 | [1003.1(2008)/Issue 7] Base Definitions and Headers | Editorial | Enhancement Request | 2016-03-10 00:16 | 2024-06-11 08:52 | ||
Reporter | EdSchouten | View Status | public | ||||
Assigned To | ajosey | ||||||
Priority | normal | Resolution | Accepted As Marked | ||||
Status | Closed | ||||||
Name | Ed Schouten | ||||||
Organization | |||||||
User Reference | |||||||
Section | syslog.h | ||||||
Page Number | - | ||||||
Line Number | - | ||||||
Interp Status | --- | ||||||
Final Accepted Text | See Note: 0003568. | ||||||
Summary | 0001033: LOG_UPTO(): Present on all (?) systems, but not standardized? | ||||||
Description |
The LOG_UPTO() macro is similar to LOG_MASK(): it can be used to construct a priority bitmask to be passed to setlogmask(). The difference being that LOG_UPTO() includes all priorities that are more severe to the one provided. For example: LOG_UPTO(LOG_CRIT) == (LOG_MASK(LOG_EMERG) | LOG_MASK(LOG_ALERT) | LOG_MASK(LOG_CRIT)) This makes setlogmask() a lot more friendly to use. Python's 'syslog' module provides a binding for this macro: https://docs.python.org/2/library/syslog.html. [^] The implementation of this function calls into C's LOG_UPTO() unconditionally, making me assume that this macro is available universally. I've checked man pages of a whole bunch of operating systems and all of them seem to describe LOG_UPTO() as well. |
||||||
Desired Action | Have LOG_UPTO standardized. | ||||||
Tags | issue8 | ||||||
Attached Files | |||||||
|
Notes | |
(0003200) shware_systems (reporter) 2016-05-06 17:57 |
LOG_UPTO is a bug in the LSB, from a POSIX conformance standpoint. It is listed there as required when it should have #ifndef _POSIX_C_SOURCE / #endif around it in the syslog.h data definitions of ISO-23360:1996 13.4.69 (LSB 3.1 Core). That's why it's fairly common, anyways, but isn't guaranteed to be available on all UNIX systems, just LINUX ones. That said, barring some obscure conflict with an older application using the identifier differently, I don't see any reason it shouldn't be added to syslog.h for Issue 8. |
(0003201) geoffclare (manager) 2016-05-07 08:05 |
Re: Note: 0003200 LOG_ is a reserved prefix for <syslog.h>. Implementations are allowed to make LOG_UPTO visible when _POSIX_C_SOURCE is defined (or _XOPEN_SOURCE). |
(0003263) geoffclare (manager) 2016-06-10 14:15 |
I just noticed that LOG_UPTO() was required by SUSv1 and was removed in SUSv2. Unfortunately the change history in SUSv2 does not say why it was removed. |
(0003560) shware_systems (reporter) 2017-02-16 19:46 edited on: 2017-02-16 19:47 |
Re: Note: 0003201 Yes, I was thinking XSH 2.2.1.1, #3 applied more as the ifdef would make it obvious it was an extension. I think documenting it is an extension some other way still in order for current implementations. |
(0003568) Don Cragun (manager) 2017-02-23 16:24 edited on: 2017-02-23 16:29 |
Add after P411, L13981 (<syslog.h>):LOG_UPTO(pri)A mask for all priorities from LOG_EMERG through pri inclusive in Change P411, L13982 (<syslog.h>) from: The <syslog.h> header shall define the following symbolic constants for use as the priority to: The <syslog.h> header shall define the following symbolic constants for use as the severity Add after P694, L23803 (closelog() DESCRIPTION) : The LOG_MASK( ) and LOG_UPTO( ) macros may be used to ensure a value |
Issue History | |||
Date Modified | Username | Field | Change |
2016-03-10 00:16 | EdSchouten | New Issue | |
2016-03-10 00:16 | EdSchouten | Status | New => Under Review |
2016-03-10 00:16 | EdSchouten | Assigned To | => ajosey |
2016-03-10 00:16 | EdSchouten | Name | => Ed Schouten |
2016-03-10 00:16 | EdSchouten | Section | => syslog.h |
2016-03-10 00:16 | EdSchouten | Page Number | => - |
2016-03-10 00:16 | EdSchouten | Line Number | => - |
2016-05-06 17:57 | shware_systems | Note Added: 0003200 | |
2016-05-07 08:05 | geoffclare | Note Added: 0003201 | |
2016-06-10 14:15 | geoffclare | Note Added: 0003263 | |
2017-02-16 19:46 | shware_systems | Note Added: 0003560 | |
2017-02-16 19:47 | shware_systems | Note Edited: 0003560 | |
2017-02-23 16:24 | Don Cragun | Note Added: 0003568 | |
2017-02-23 16:25 | Don Cragun | Note Edited: 0003568 | |
2017-02-23 16:25 | Don Cragun | Tag Attached: issue8 | |
2017-02-23 16:26 | Don Cragun | Interp Status | => --- |
2017-02-23 16:26 | Don Cragun | Final Accepted Text | => See Note: 0003568. |
2017-02-23 16:26 | Don Cragun | Status | Under Review => Resolved |
2017-02-23 16:26 | Don Cragun | Resolution | Open => Accepted As Marked |
2017-02-23 16:29 | Don Cragun | Note Edited: 0003568 | |
2020-04-14 15:41 | geoffclare | Status | Resolved => Applied |
2024-06-11 08:52 | agadmin | Status | Applied => Closed |
Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group |