From: "Gérard / F6FGZ" <f6fgz@free.fr>
To: Linux-Hams <linux-hams@vger.kernel.org>
Subject: Re: Soundmodem Logging
Date: Mon, 07 Mar 2005 07:24:05 +0100 [thread overview]
Message-ID: <422BF384.E847A97@free.fr> (raw)
In-Reply-To: 422BD284.6060309@utoronto.ca
Dave Stubbs a écrit :
> Tomi Manninen wrote:
>
> >On Sun, 2005-03-06 at 15:12, Dave Stubbs wrote:
> >
> >
> >
> >>So, a new question - does anyone know where the console messages (they
> >>start with "Tx:") come from? Can they be redirected to syslog or sent
> >>there instead of the console?
> >>
> >>
> >
> >It's soundmodem in soundcard/kisspkt.c:
> >
> > line 306: printf("Rx: %s\n", buf);
> >
> >and
> >
> > line 407: printf("Tx: %s\n", buf);
> >
> >So it's hardcoded to go to stdout, you need to modify the source to
> >make it go elsewhere.
> >
> >
> >
> Indeed.
>
> Well, there's the culprit. Actually, what I would really like to see is
> the same output from *listen -a* showing up in the syslog. Is there a
> way to do something like "listen -a > /dev/log" or something like that?
> It seems that I can't redirect stdout to a FIFO, or this would work. Is
> there a tool that would do it then?
>
> Thanks for the help,
>
> Dave
> -
I used this function for showing up in the syslog, it may be modified for your
use:
#include <syslog.h>
#define LOG_LEVEL LOG_INFO
void log(int loglevel, const char *fmt, ...)
{
va_list args;
int pri;
static int opened = 0;
if (!opened) {
openlog("your_identifier", LOG_CONS, LOG_LOCAL6);
opened = 1;
}
pri = loglevel;
va_start(args, fmt);
vsprintf(buf, fmt, args);
syslog(pri, buf);
va_end(args);
}
log(LOG_LEVEL, "%d %s%d.%06d %ld\n", dcft.tv_sec, sign? "-": "+", delta.tv_sec,
delta.tv_usec, tx.freq);
--
73 Gérard F6FGZ
-
To unsubscribe from this list: send the line "unsubscribe linux-hams" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2005-03-07 6:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-13 18:02 newbie soundmodem question about mic vs line input James Washer
2004-02-13 18:39 ` Jeroen Vreeken
2005-03-06 2:46 ` Soundmodem Logging Dave Stubbs
2005-03-06 5:15 ` Niall Parker
2005-03-06 12:34 ` Dave Stubbs
2005-03-06 13:12 ` Dave Stubbs
2005-03-06 15:36 ` Tomi Manninen
2005-03-07 4:03 ` Dave Stubbs
2005-03-07 6:24 ` Gérard / F6FGZ [this message]
2004-02-13 18:39 ` newbie soundmodem question about mic vs line input Tomi Manninen
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=422BF384.E847A97@free.fr \
--to=f6fgz@free.fr \
--cc=linux-hams@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.