Logging in Nerves

72 views
Skip to first unread message

Frank Hunleth

unread,
Apr 4, 2014, 9:21:20 AM4/4/14
to nerves-...@googlegroups.com
A few people have asked about best practices regarding logging in
Nerves. I haven't coalesced on anything definitive, but I thought that
it may be useful to publicize what I've been doing recently. I'm using
Basho's Lager framework (like many people). I've set it up to log to
/tmp so that I don't wear out the SDCard. I tend to doubt my level of
logging will do this, but the cards do eventually wear out. I also
wrote a small Erlang application to route log messages from the kernel
and syslog to Lager. You can find it here:
https://github.com/fhunleth/l2elog.

This setup may sound backwards especially if you come from an
environment where all log messages go to syslog. For Nerves, though,
Erlang and Lager are quite capable of handling logging. Routing
messages to an external syslog daemon like would be typical in Linux
has a side effect of requiring additional C code and that's something
that I've been trying to minimize.

Frank

--
Frank Hunleth
Troodon Software LLC
Embedded Software Development
http://troodon-software.com/

ghitchens

unread,
Apr 4, 2014, 2:02:19 PM4/4/14
to nerves-...@googlegroups.com
Thanks for this!    Sorry to have gone dark, but I'm in heavy ship mode (actually shipping a prototype product to about 10 customers) - for a product using "nerves"!   I was just looking at how to cleanup my logging support as one of my final steps and saw your post - very timely.   I'm about to integrate some of the other changes you made as well.

Frank Hunleth

unread,
Apr 4, 2014, 2:59:52 PM4/4/14
to nerves-...@googlegroups.com
That's awesome! That completely makes my day to know that there's
embedded Elixir and Nerves code out there.

Thanks,
Frank
> --
> You received this message because you are subscribed to the Google Groups
> "nerves-project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to nerves-projec...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

William Babson

unread,
Apr 4, 2014, 3:39:19 PM4/4/14
to nerves-...@googlegroups.com
There will be more, if I have my way...


Cheers!

Bill
billbabson (Skype)


Reply all
Reply to author
Forward
0 new messages