We had an idea with Richard that elarm:raise and elarm:clear could return whether they raised/cleared an alarm or did nothing because the alarm was already existing/non-existing.
This way we could write code like this, which logs the problems only once:
case elarm:raise(...) of
ok ->
lager:error(...);
existing ->
ok
end.
@nygge, what do you think?