Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Jürgen Benjamin Ronshausen" <b.r@rie.eu>
To: buildroot@busybox.net
Subject: [Buildroot] how does udhcpc print messages to console
Date: Tue, 06 Nov 2012 20:48:35 +0100	[thread overview]
Message-ID: <1352231315.3710.6.camel@debian.fritz.box> (raw)

hi,

i am trying to print message from my program which is called in a shell
script.

problem is the shell script collects all the output from my program and
doesn't print it immediately.

i noticed, that udhcpc print its messages immediately by calling syslog.

from debug.h

# define LOG_EMERG	"EMERGENCY!"
# define LOG_ALERT	"ALERT!"
# define LOG_CRIT	"critical!"
# define LOG_WARNING	"warning"
# define LOG_ERR	"error"
# define LOG_INFO	"info"
# define LOG_DEBUG	"debug"
# define LOG(level, str, args...) do { printf("%s, ", level); \
				printf(str, ## args); \
				printf("\n"); } while(0)
# define OPEN_LOG(name) do {;} while(0)
#define CLOSE_LOG() do {;} while(0)

from dhcpc.c

OPEN_LOG("udhcpc");
LOG(LOG_INFO, "udhcp client (v%s) started", VERSION);

is there more than this to do?

thx J?rgen

             reply	other threads:[~2012-11-06 19:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-06 19:48 Jürgen Benjamin Ronshausen [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-11-07 13:54 [Buildroot] how does udhcpc print messages to console Jürgen Benjamin Ronshausen

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=1352231315.3710.6.camel@debian.fritz.box \
    --to=b.r@rie.eu \
    --cc=buildroot@busybox.net \
    /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