You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nuttx.apache.org by Michal Lenc <mi...@seznam.cz> on 2025/04/29 06:37:46 UTC

[VOTE] Change setlogmask behavior to POSIX standard

Hi all,

I've submitted pull request that changes setlogmask function behavior to
the one expected by POSIX standard
<https://github.com/apache/nuttx/pull/16280>. The description of the
change is provided in the mailing list, to summarize it, our
implementation uses zero argument to set logging mask to zero and thus
disable the logging at all. However, POSIX clearly states that passing
zero argument should not modify the current logging mask, but just
return the old one. We should change the behavior to comply with POSIX
standards here.

As Tomek suggested, we should vote here first, because this is a
potential breaking change for existing applications. So let's vote
for/against the change.

It's also worth noting that POSIX probably (or at least I haven't found
a way) doesn't allow to disable all logging at runtime, just to set the
mask to the highest priority (lowest amount of messages, just emergency
logs) with LOG_EMERG (or any other priority you want). Nevertheless, I
consider the POSIX (and Linux) compatibility more important in this case
and vote for the change.

Thanks,

Michal


Re: [VOTE] Change setlogmask behavior to POSIX standard

Posted by Alin Jerpelea <je...@gmail.com>.
+1 from me

On Tue, Apr 29, 2025 at 8:53 AM Matteo Golin <ma...@gmail.com> wrote:

> +1 from me!
>
> On Tue, Apr 29, 2025, 2:38 AM Michal Lenc <mi...@seznam.cz> wrote:
>
> > Hi all,
> >
> > I've submitted pull request that changes setlogmask function behavior to
> > the one expected by POSIX standard
> > <https://github.com/apache/nuttx/pull/16280>. The description of the
> > change is provided in the mailing list, to summarize it, our
> > implementation uses zero argument to set logging mask to zero and thus
> > disable the logging at all. However, POSIX clearly states that passing
> > zero argument should not modify the current logging mask, but just
> > return the old one. We should change the behavior to comply with POSIX
> > standards here.
> >
> > As Tomek suggested, we should vote here first, because this is a
> > potential breaking change for existing applications. So let's vote
> > for/against the change.
> >
> > It's also worth noting that POSIX probably (or at least I haven't found
> > a way) doesn't allow to disable all logging at runtime, just to set the
> > mask to the highest priority (lowest amount of messages, just emergency
> > logs) with LOG_EMERG (or any other priority you want). Nevertheless, I
> > consider the POSIX (and Linux) compatibility more important in this case
> > and vote for the change.
> >
> > Thanks,
> >
> > Michal
> >
> >
>

Re: [VOTE] Change setlogmask behavior to POSIX standard

Posted by Matteo Golin <ma...@gmail.com>.
+1 from me!

On Tue, Apr 29, 2025, 2:38 AM Michal Lenc <mi...@seznam.cz> wrote:

> Hi all,
>
> I've submitted pull request that changes setlogmask function behavior to
> the one expected by POSIX standard
> <https://github.com/apache/nuttx/pull/16280>. The description of the
> change is provided in the mailing list, to summarize it, our
> implementation uses zero argument to set logging mask to zero and thus
> disable the logging at all. However, POSIX clearly states that passing
> zero argument should not modify the current logging mask, but just
> return the old one. We should change the behavior to comply with POSIX
> standards here.
>
> As Tomek suggested, we should vote here first, because this is a
> potential breaking change for existing applications. So let's vote
> for/against the change.
>
> It's also worth noting that POSIX probably (or at least I haven't found
> a way) doesn't allow to disable all logging at runtime, just to set the
> mask to the highest priority (lowest amount of messages, just emergency
> logs) with LOG_EMERG (or any other priority you want). Nevertheless, I
> consider the POSIX (and Linux) compatibility more important in this case
> and vote for the change.
>
> Thanks,
>
> Michal
>
>

Re: [VOTE] Change setlogmask behavior to POSIX standard

Posted by Tiago Medicci Serrano <ti...@gmail.com>.
+1

Em ter., 29 de abr. de 2025 às 08:47, Ville Juven
<vi...@unikie.com.invalid> escreveu:

> +1 from here as well. POSIX compliance should take precedence over
> everything else including introduction of regressions.
>
> -Ville
> ________________________________
> From: Tomek CEDRO <to...@cedro.info>
> Sent: Tuesday, April 29, 2025 2:38 PM
> To: dev@nuttx.apache.org <de...@nuttx.apache.org>
> Subject: Re: [VOTE] Change setlogmask behavior to POSIX standard
>
> Thank you Michal, good catch! :-)
>
> +1 from me :-)
>
> I just wonder how to communicate the change to folks that may use
> existing functionality and what would be the proposed fix to get the
> same behavior after update (i.e. send logs to /dev/null) :-)
>
> Tomek
>
> On Tue, Apr 29, 2025 at 8:39 AM Michal Lenc <mi...@seznam.cz> wrote:
> >
> > Hi all,
> >
> > I've submitted pull request that changes setlogmask function behavior to
> > the one expected by POSIX standard
> > <
> https://eur05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Fnuttx%2Fpull%2F16280&data=05%7C02%7Cville.juven%40unikie.com%7Cb184563caea14146cffe08dd87126ca1%7C9207ba3377314e38abf1c7183f53f8c3%7C0%7C0%7C638815235380742686%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=veeI1dctqyXsFg3tCHDdplfpVyE9Rr%2FhHUtBqcYnGhk%3D&reserved=0
> <https://github.com/apache/nuttx/pull/16280>>. The description of the
> > change is provided in the mailing list, to summarize it, our
> > implementation uses zero argument to set logging mask to zero and thus
> > disable the logging at all. However, POSIX clearly states that passing
> > zero argument should not modify the current logging mask, but just
> > return the old one. We should change the behavior to comply with POSIX
> > standards here.
> >
> > As Tomek suggested, we should vote here first, because this is a
> > potential breaking change for existing applications. So let's vote
> > for/against the change.
> >
> > It's also worth noting that POSIX probably (or at least I haven't found
> > a way) doesn't allow to disable all logging at runtime, just to set the
> > mask to the highest priority (lowest amount of messages, just emergency
> > logs) with LOG_EMERG (or any other priority you want). Nevertheless, I
> > consider the POSIX (and Linux) compatibility more important in this case
> > and vote for the change.
> >
> > Thanks,
> >
> > Michal
> >
>
>
> --
> CeDeROM, SQ7MHZ,
> https://eur05.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.tomek.cedro.info%2F&data=05%7C02%7Cville.juven%40unikie.com%7Cb184563caea14146cffe08dd87126ca1%7C9207ba3377314e38abf1c7183f53f8c3%7C0%7C0%7C638815235380775227%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=GKd2ExS6U%2BMH4mpy93eFtCshfVNLIZ8m8kua0j97yDU%3D&reserved=0
> <http://www.tomek.cedro.info/>
>

Re: [VOTE] Change setlogmask behavior to POSIX standard

Posted by Ville Juven <vi...@unikie.com.INVALID>.
+1 from here as well. POSIX compliance should take precedence over everything else including introduction of regressions.

-Ville
________________________________
From: Tomek CEDRO <to...@cedro.info>
Sent: Tuesday, April 29, 2025 2:38 PM
To: dev@nuttx.apache.org <de...@nuttx.apache.org>
Subject: Re: [VOTE] Change setlogmask behavior to POSIX standard

Thank you Michal, good catch! :-)

+1 from me :-)

I just wonder how to communicate the change to folks that may use
existing functionality and what would be the proposed fix to get the
same behavior after update (i.e. send logs to /dev/null) :-)

Tomek

On Tue, Apr 29, 2025 at 8:39 AM Michal Lenc <mi...@seznam.cz> wrote:
>
> Hi all,
>
> I've submitted pull request that changes setlogmask function behavior to
> the one expected by POSIX standard
> <https://eur05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Fnuttx%2Fpull%2F16280&data=05%7C02%7Cville.juven%40unikie.com%7Cb184563caea14146cffe08dd87126ca1%7C9207ba3377314e38abf1c7183f53f8c3%7C0%7C0%7C638815235380742686%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=veeI1dctqyXsFg3tCHDdplfpVyE9Rr%2FhHUtBqcYnGhk%3D&reserved=0<https://github.com/apache/nuttx/pull/16280>>. The description of the
> change is provided in the mailing list, to summarize it, our
> implementation uses zero argument to set logging mask to zero and thus
> disable the logging at all. However, POSIX clearly states that passing
> zero argument should not modify the current logging mask, but just
> return the old one. We should change the behavior to comply with POSIX
> standards here.
>
> As Tomek suggested, we should vote here first, because this is a
> potential breaking change for existing applications. So let's vote
> for/against the change.
>
> It's also worth noting that POSIX probably (or at least I haven't found
> a way) doesn't allow to disable all logging at runtime, just to set the
> mask to the highest priority (lowest amount of messages, just emergency
> logs) with LOG_EMERG (or any other priority you want). Nevertheless, I
> consider the POSIX (and Linux) compatibility more important in this case
> and vote for the change.
>
> Thanks,
>
> Michal
>


--
CeDeROM, SQ7MHZ, https://eur05.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.tomek.cedro.info%2F&data=05%7C02%7Cville.juven%40unikie.com%7Cb184563caea14146cffe08dd87126ca1%7C9207ba3377314e38abf1c7183f53f8c3%7C0%7C0%7C638815235380775227%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=GKd2ExS6U%2BMH4mpy93eFtCshfVNLIZ8m8kua0j97yDU%3D&reserved=0<http://www.tomek.cedro.info/>

Re: [VOTE] Change setlogmask behavior to POSIX standard

Posted by Tomek CEDRO <to...@cedro.info>.
Thank you Michal, good catch! :-)

+1 from me :-)

I just wonder how to communicate the change to folks that may use
existing functionality and what would be the proposed fix to get the
same behavior after update (i.e. send logs to /dev/null) :-)

Tomek

On Tue, Apr 29, 2025 at 8:39 AM Michal Lenc <mi...@seznam.cz> wrote:
>
> Hi all,
>
> I've submitted pull request that changes setlogmask function behavior to
> the one expected by POSIX standard
> <https://github.com/apache/nuttx/pull/16280>. The description of the
> change is provided in the mailing list, to summarize it, our
> implementation uses zero argument to set logging mask to zero and thus
> disable the logging at all. However, POSIX clearly states that passing
> zero argument should not modify the current logging mask, but just
> return the old one. We should change the behavior to comply with POSIX
> standards here.
>
> As Tomek suggested, we should vote here first, because this is a
> potential breaking change for existing applications. So let's vote
> for/against the change.
>
> It's also worth noting that POSIX probably (or at least I haven't found
> a way) doesn't allow to disable all logging at runtime, just to set the
> mask to the highest priority (lowest amount of messages, just emergency
> logs) with LOG_EMERG (or any other priority you want). Nevertheless, I
> consider the POSIX (and Linux) compatibility more important in this case
> and vote for the change.
>
> Thanks,
>
> Michal
>


-- 
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info

Re: [VOTE] Change setlogmask behavior to POSIX standard

Posted by Michal Lenc <mi...@seznam.cz>.
Hi,

it's been 72 hours since the vote start with 7 +1 votes and no 0 or -1
votes. I think we can close the vote now and I'll mark the pull request
as ready. Thanks.

Michal

On 4/29/25 08:37, Michal Lenc wrote:
> Hi all,
>
> I've submitted pull request that changes setlogmask function behavior to
> the one expected by POSIX standard
> <https://github.com/apache/nuttx/pull/16280>. The description of the
> change is provided in the mailing list, to summarize it, our
> implementation uses zero argument to set logging mask to zero and thus
> disable the logging at all. However, POSIX clearly states that passing
> zero argument should not modify the current logging mask, but just
> return the old one. We should change the behavior to comply with POSIX
> standards here.
>
> As Tomek suggested, we should vote here first, because this is a
> potential breaking change for existing applications. So let's vote
> for/against the change.
>
> It's also worth noting that POSIX probably (or at least I haven't found
> a way) doesn't allow to disable all logging at runtime, just to set the
> mask to the highest priority (lowest amount of messages, just emergency
> logs) with LOG_EMERG (or any other priority you want). Nevertheless, I
> consider the POSIX (and Linux) compatibility more important in this case
> and vote for the change.
>
> Thanks,
>
> Michal
>

Re: [VOTE] Change setlogmask behavior to POSIX standard

Posted by Nathan Hartman <ha...@gmail.com>.
+1 from me

Thanks,

On Tue, Apr 29, 2025 at 2:39 AM Michal Lenc <mi...@seznam.cz> wrote:

> Hi all,
>
> I've submitted pull request that changes setlogmask function behavior to
> the one expected by POSIX standard
> <https://github.com/apache/nuttx/pull/16280>. The description of the
> change is provided in the mailing list, to summarize it, our
> implementation uses zero argument to set logging mask to zero and thus
> disable the logging at all. However, POSIX clearly states that passing
> zero argument should not modify the current logging mask, but just
> return the old one. We should change the behavior to comply with POSIX
> standards here.
>
> As Tomek suggested, we should vote here first, because this is a
> potential breaking change for existing applications. So let's vote
> for/against the change.
>
> It's also worth noting that POSIX probably (or at least I haven't found
> a way) doesn't allow to disable all logging at runtime, just to set the
> mask to the highest priority (lowest amount of messages, just emergency
> logs) with LOG_EMERG (or any other priority you want). Nevertheless, I
> consider the POSIX (and Linux) compatibility more important in this case
> and vote for the change.
>
> Thanks,
>
> Michal
>
>

Re: [VOTE] Change setlogmask behavior to POSIX standard

Posted by "Alan C. Assis" <ac...@gmail.com>.
+1

On Tue, Apr 29, 2025 at 3:38 AM Michal Lenc <mi...@seznam.cz> wrote:

> Hi all,
>
> I've submitted pull request that changes setlogmask function behavior to
> the one expected by POSIX standard
> <https://github.com/apache/nuttx/pull/16280>. The description of the
> change is provided in the mailing list, to summarize it, our
> implementation uses zero argument to set logging mask to zero and thus
> disable the logging at all. However, POSIX clearly states that passing
> zero argument should not modify the current logging mask, but just
> return the old one. We should change the behavior to comply with POSIX
> standards here.
>
> As Tomek suggested, we should vote here first, because this is a
> potential breaking change for existing applications. So let's vote
> for/against the change.
>
> It's also worth noting that POSIX probably (or at least I haven't found
> a way) doesn't allow to disable all logging at runtime, just to set the
> mask to the highest priority (lowest amount of messages, just emergency
> logs) with LOG_EMERG (or any other priority you want). Nevertheless, I
> consider the POSIX (and Linux) compatibility more important in this case
> and vote for the change.
>
> Thanks,
>
> Michal
>
>