Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add optional lager config option

  • Loading branch information...
commit dca1ab7363e244880470b16384d415d34ba976f7 1 parent ad21b1f
@cloudhead authored
Showing with 13 additions and 1 deletion.
  1. +11 −0 erlapp.rebar.config
  2. +1 −1  erlapp.template
  3. +1 −0  erlapp_app.erl
View
11 erlapp.rebar.config
@@ -1,9 +1,20 @@
+%% Directories
{sub_dirs, ["rel"]}.
{lib_dirs, ["deps"]}.
+
+{{#lager}}
+%% Lager transform
+{erl_opts, [{parse_transform, lager_transform}]}.
+{{/lager}}
+
+%% Dependencies
{deps, [
% {misultin, ".*", {git, "git://github.com/ostinelli/misultin", {branch, "master"}}},
% {json, ".*", {git, "git://github.com/davisp/eep0018", {branch, "master"}}},
% {webmachine, ".*", {git, "git://github.com/basho/webmachine", {branch, "master"}}},
% {riakc, ".*", {git, "git://github.com/basho/riak-erlang-client", {branch, "master"}}}
+ {{#lager}}
+ {lager, ".*", {git, "git://github.com/basho/lager", {branch, "master"}}}
+ {{/lager}}
]}.
View
2  erlapp.template
@@ -1,4 +1,4 @@
-{variables, [{appid, "myapp"}]}.
+{variables, [{lager, false}, {appid, "myapp"}]}.
{template, "erlapp.app.src", "src/{{appid}}.app.src"}.
{template, "erlapp_app.erl", "src/{{appid}}_app.erl"}.
View
1  erlapp_app.erl
@@ -14,6 +14,7 @@
%% ~~~~~~~~~~~~~~~~~~~~~
start(_StartType, _StartArgs) ->
+ {{#lager}}lager:start(),{{/lager}}
{{appid}}_sup:start_link().
stop(_State) ->
Please sign in to comment.
Something went wrong with that request. Please try again.