Permalink
Browse files

Merge branch 'master' of https://github.com/inaka/riak_err

  • Loading branch information...
2 parents 5dc308a + d777bf3 commit 805c2c7191503fd919ca1600ea941fda28f4d7ab Fernando "Brujo" Benavides committed Dec 22, 2011
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/riak_err_handler.erl
@@ -151,7 +151,10 @@ handle_event(Event, #state{errlog_type = ErrlogType, conslog_type = ConslogType,
end,
case should_log_it(ErrlogType, ErrorP, ReportStr) of
true when LogFH /= undefined ->
- file:write(LogFH, Formatted);
+ case file:write(LogFH, Formatted) of
+ ok -> ok;
+ {error, _Reason} -> io:format("Couldn't log: " ++ Formatted)
+ end;
_ ->
ok
end,

0 comments on commit 805c2c7

Please sign in to comment.