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/