Re: [E-devel] [EGIT] [apps/terminology] master 02/02: configure.ac: remove --with_max_log_level
On Tue, Oct 18, 2016 at 10:14 AM, Boris Faurewrote: > Yesterday I wasted time wondering why EINA_LOG_LEVELS="win:4,termpty:4" > was showing the "win" debug logs but not the "termpty" ones. I checked > EFL and since I'm using the dev profile, EINA_LOG_LEVEL_MAXIMUM > was not set. It was in termpty.c but not win.c because this one included > config.h and not the other. I was fed up and removed your code. that's okay, I just wanted to clarify what it's purpose, as I said I see no problem in removing that as one can easily get the same effect with CFLAGS. OTOH it did show a bug in the code, all source files in a project should use `config.h` since it will define stuff as _GNU_SOURCE and other checks. -- Gustavo Sverzut Barbieri -- Mobile: +55 (16) 99354-9890 -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] [EGIT] [apps/terminology] master 02/02: configure.ac: remove --with_max_log_level
Yesterday I wasted time wondering why EINA_LOG_LEVELS="win:4,termpty:4" was showing the "win" debug logs but not the "termpty" ones. I checked EFL and since I'm using the dev profile, EINA_LOG_LEVEL_MAXIMUM was not set. It was in termpty.c but not win.c because this one included config.h and not the other. I was fed up and removed your code. On 16-10-18 09:51, Gustavo Sverzut Barbieri wrote: > Hi Boris, > > This is not a correct understanding. If you disable a log using > maximum log level, then the compiler will see a "small_int > big_int", > which always evaluate to FALSE, and will remove the block on -O2 and > up and this is PER USER, not in the EFL itself. The value you apply to > EFL will only be valid for EFL itself (its .c) as this won't go in the > public headers. > > That said, dropping such from terminology is likely okay as nobody > uses it. If one wants to force a maximum log level, simply using > CFLAGS+="-DEINA_LOG_LEVEL_MAXIMUM=2" will do it. > > > > On Mon, Oct 17, 2016 at 6:34 PM, Boris Faurewrote: > > billiob pushed a commit to branch master. > > > > http://git.enlightenment.org/apps/terminology.git/commit/?id=6907ecf9f2060b7743528dd0147b262c17f1dc28 > > > > commit 6907ecf9f2060b7743528dd0147b262c17f1dc28 > > Author: Boris Faure > > Date: Mon Oct 17 22:32:35 2016 +0200 > > > > configure.ac: remove --with_max_log_level > > > > If one don't want logs, it can already be done at efl's level. > > I wasted too much time on that stupid setting. > > --- > > configure.ac | 17 - > > 1 file changed, 17 deletions(-) > > > > diff --git a/configure.ac b/configure.ac > > index 0c86801..e9ecd97 100644 > > --- a/configure.ac > > +++ b/configure.ac > > @@ -135,23 +135,6 @@ CFLAGS=$orig_cflags > > > > EFL_WITH_BIN([edje], [edje-cc], [edje_cc]) > > > > -with_max_log_level="EINA_LOG_LEVEL_ERR" > > -AC_ARG_WITH(maximum-log-level, > > - [AC_HELP_STRING([--with-maximum-log-level=NUMBER], > > - [limit terminology log level to the given number, any > > call to EINA_LOG() with values greater than this will be compiled out, > > ignoring runtime settings, but saving function calls.])], > > - [ > > -if test "x${withval}" != "xno"; then > > - if echo "${withval}" | grep -E '^[[0-9]]+$' >/dev/null 2>/dev/null; > > then > > - AC_MSG_NOTICE([ignoring any EINA_LOG() with level greater than > > ${withval}]) > > - with_max_log_level="${withval}" > > - else > > - AC_MSG_ERROR([--with-maximum-log-level takes a decimal number, > > got "${withval}" instead.]) > > - fi > > -fi > > -], [:]) > > - > > -AC_DEFINE_UNQUOTED(EINA_LOG_LEVEL_MAXIMUM, ${with_max_log_level}, [if set, > > logging is limited to this amount.]) > > - > > AC_CONFIG_FILES([ > > terminology.spec > > pkgbuild/PKGBUILD > > > > -- > > > > > > > > -- > Gustavo Sverzut Barbieri > -- > Mobile: +55 (16) 99354-9890 > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > ___ > enlightenment-devel mailing list > enlightenment-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- Boris Faure Pointer Arithmetician -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] [EGIT] [apps/terminology] master 02/02: configure.ac: remove --with_max_log_level
Hi Boris, This is not a correct understanding. If you disable a log using maximum log level, then the compiler will see a "small_int > big_int", which always evaluate to FALSE, and will remove the block on -O2 and up and this is PER USER, not in the EFL itself. The value you apply to EFL will only be valid for EFL itself (its .c) as this won't go in the public headers. That said, dropping such from terminology is likely okay as nobody uses it. If one wants to force a maximum log level, simply using CFLAGS+="-DEINA_LOG_LEVEL_MAXIMUM=2" will do it. On Mon, Oct 17, 2016 at 6:34 PM, Boris Faurewrote: > billiob pushed a commit to branch master. > > http://git.enlightenment.org/apps/terminology.git/commit/?id=6907ecf9f2060b7743528dd0147b262c17f1dc28 > > commit 6907ecf9f2060b7743528dd0147b262c17f1dc28 > Author: Boris Faure > Date: Mon Oct 17 22:32:35 2016 +0200 > > configure.ac: remove --with_max_log_level > > If one don't want logs, it can already be done at efl's level. > I wasted too much time on that stupid setting. > --- > configure.ac | 17 - > 1 file changed, 17 deletions(-) > > diff --git a/configure.ac b/configure.ac > index 0c86801..e9ecd97 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -135,23 +135,6 @@ CFLAGS=$orig_cflags > > EFL_WITH_BIN([edje], [edje-cc], [edje_cc]) > > -with_max_log_level="EINA_LOG_LEVEL_ERR" > -AC_ARG_WITH(maximum-log-level, > - [AC_HELP_STRING([--with-maximum-log-level=NUMBER], > - [limit terminology log level to the given number, any > call to EINA_LOG() with values greater than this will be compiled out, > ignoring runtime settings, but saving function calls.])], > - [ > -if test "x${withval}" != "xno"; then > - if echo "${withval}" | grep -E '^[[0-9]]+$' >/dev/null 2>/dev/null; > then > - AC_MSG_NOTICE([ignoring any EINA_LOG() with level greater than > ${withval}]) > - with_max_log_level="${withval}" > - else > - AC_MSG_ERROR([--with-maximum-log-level takes a decimal number, got > "${withval}" instead.]) > - fi > -fi > -], [:]) > - > -AC_DEFINE_UNQUOTED(EINA_LOG_LEVEL_MAXIMUM, ${with_max_log_level}, [if set, > logging is limited to this amount.]) > - > AC_CONFIG_FILES([ > terminology.spec > pkgbuild/PKGBUILD > > -- > > -- Gustavo Sverzut Barbieri -- Mobile: +55 (16) 99354-9890 -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel