Erlang: Log to Files
Since I had a heck of a time finding out how to do something that ought to be really easy, I thought I'd post what I found. If you want Erlang to write errors to a file instead of stdout, add this to the command line:
-kernel error_logger '{file, "/tmp/erl.log"}'
Maybe there's a better solution, in which case feel free to correct me.
Trackbacks
Use the following link to trackback from your own site:
http://journal.dedasys.com/trackbacks?article_id=2189
about 1 hour later:
I've always found easier to redirect stdout/stderr than to have a program take care of its own log file.
Even piping to logger is a good solution as you can add all useful info the program might not print itself (time, pid, etc)