Skip to content

Commit

Permalink
Merge pull request #1 from mremond/Ensure_set_env_applied
Browse files Browse the repository at this point in the history
Ensure set_env value is always applied

By loading application before calling set_env we ensure set_env will always work.
  • Loading branch information
mremond committed Apr 8, 2013
2 parents a5e3217 + 22a87cd commit 0c55196
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lager_erlbrake_backend.erl
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ init(Args) when is_list(Args) ->
Environment = proplists:get_value(environment, Args),
ApiKey = proplists:get_value(api_key, Args),
NotifyLevel = proplists:get_value(notify_level, Args, error),
application:load(erlbrake),
application:set_env(erlbrake, api_key, ApiKey),
application:set_env(erlbrake, environment, Environment),
application:set_env(erlbrake, error_logger, false), % not needed with lager
Expand Down

0 comments on commit 0c55196

Please sign in to comment.