ts-7000
[Top] [All Lists]

[ts-7000] Re: C error logging in embedded controller

To:
Subject: [ts-7000] Re: C error logging in embedded controller
From: "naturalwatt" <>
Date: Tue, 29 Dec 2009 13:49:11 -0000
A probably better way is to use syslog() calls in your program.  The problem 
with writing to a log file is that by default the writes are buffered, so if 
your program crashes you will probably lose the last buffer full of error 
messages.

Once you are writing messages out using syslog() you can then configure the 
syslogd to write a file for your or even send to to a remote machine.

--- In  Petr ©tetiar <> wrote:
>
> Achim <> [2009-12-29 01:15:36]:
>
> Hi,
>
> > Do anybody recommend a library/handler beneficial in embedded C programming
> > for logging?  I need one for a controller running on TS-7800 under Debian
> > Linux. My application is working fine, but showing any Error/Warning/Trace
> > only as printf on the console. Whenever I start it in background the output
> > is gone...
>
> You can redirect that output to some log file:
>
> /usr/bin/application > /var/log/application.log 2>&1
>
> > - Saving Fatal, Errors, Warnings, Infos and Traces into a file or SQL
> > database - automatically remove old data from that file/database, like in
> > round-robin datasets - beside the message, also save a timestamp and the
> > function name - allow to search and browse within the saved log, including
> > filtering - allow a "live view" to show what happens now, like printf do -
> > configuration of saved level (e.g. only fatal and error, no warning or no
> > trace) based on file or function name - reduce saved/showed messages by
> > bundling these one which appears very often together in one message.
>
> I would use SQLite, you can do almost all that using standard SQL statements.
>
> > I already found nagius and cacti, but it looks as they only offer viewing
> > capabilities and not address logging.
>
> Those are overkill for embedded systems.
>
> -- ynezz
>




------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
    
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU