mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Eugen.Wiens@JUMO.net
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] added colored print out of log levels
Date: Wed, 14 Feb 2018 08:32:37 +0100	[thread overview]
Message-ID: <20180214073237.p2kkvwhe373iuhac@pengutronix.de> (raw)
In-Reply-To: <OFB3F14132.C502B498-ONC1258234.0028C966-C1258234.0028E812@LocalDomain>

On Wed, Feb 14, 2018 at 08:26:46AM +0100, Eugen.Wiens@JUMO.net wrote:
>    Hi Sascha,
> 
>    Sascha Hauer <s.hauer@pengutronix.de> schrieb am 13.02.2018 09:37:17:
> 
>    > Von: Sascha Hauer <s.hauer@pengutronix.de>
>    > An: Eugen Wiens <eugen.wiens@jumo.net>
>    > Kopie: barebox@lists.infradead.org
>    > Datum: 13.02.2018 09:37
>    > Betreff: Re: [PATCH] added colored print out of log levels
>    >
>    > HI Eugen,
>    >
>    > On Fri, Feb 09, 2018 at 01:28:45PM +0100, Eugen Wiens wrote:
>    > > When the system is booting the warnings and errors are not be
>    > quickly discovered.
>    > > With this improvement the errors are colored red, the warnings
>    > yellow and the notices blue.
>    >
>    > I like this because I like colors ;)
>    > However, some people do not. Can we make this honour the value of the
>    > global.allow_color variable?
>    That sounds good for me.
> 
>    > This variable is currently only used in the
>    > environment, so we would have to move it to C code by adding a
>    > globalvar_add_simple_bool().
>    Where is the best place to call this function, inside the file
>    "console_common.c" or

That would be a suitable place. You could rename loglevel_init to
console_common_init for example.

>    on a more generic place. Which file is the best one to learn the handling
>    of the
>    function "globalvar_add_simple_bool"?

You pass it an int pointer which is treated as boolean variable. Setting
the globalvar on the command line directly changes the integer variable.
Other than that, grep the source, there are not so many users of that
function.

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

       reply	other threads:[~2018-02-14  7:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <OFB3F14132.C502B498-ONC1258234.0028C966-C1258234.0028E812@LocalDomain>
2018-02-14  7:32 ` Sascha Hauer [this message]
2018-02-09 12:28 Eugen Wiens
2018-02-13  8:37 ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180214073237.p2kkvwhe373iuhac@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=Eugen.Wiens@JUMO.net \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox