couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From beno...@apache.org
Subject [14/50] lager commit: updated refs/heads/import-master to da4419e
Date Thu, 13 Feb 2014 16:43:16 GMT
Fix lager eunit initialization


Project: http://git-wip-us.apache.org/repos/asf/couchdb-lager/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-lager/commit/be6a315e
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-lager/tree/be6a315e
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-lager/diff/be6a315e

Branch: refs/heads/import-master
Commit: be6a315e590c5c508419a52717496deb608a52e3
Parents: ad40089
Author: Pedram Nimreezi <deadzen@deadzen.com>
Authored: Mon Nov 11 16:50:24 2013 -0500
Committer: Pedram Nimreezi <deadzen@deadzen.com>
Committed: Mon Nov 11 16:50:24 2013 -0500

----------------------------------------------------------------------
 src/error_logger_lager_h.erl  | 3 +--
 src/lager_console_backend.erl | 4 ++--
 src/lager_file_backend.erl    | 4 ++--
 src/lager_handler_watcher.erl | 4 ++--
 test/lager_test_backend.erl   | 8 ++++----
 5 files changed, 11 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-lager/blob/be6a315e/src/error_logger_lager_h.erl
----------------------------------------------------------------------
diff --git a/src/error_logger_lager_h.erl b/src/error_logger_lager_h.erl
index 6acfec4..1c7e092 100644
--- a/src/error_logger_lager_h.erl
+++ b/src/error_logger_lager_h.erl
@@ -414,8 +414,7 @@ supervisor_name(Name) -> Name.
 t0() ->
     application:stop(lager),
     application:stop(sasl),
-    application:start(sasl),
-    application:start(lager),
+    lager:start(),
     set_high_water(5),
     [error_logger:warning_msg("Foo ~p!", [X]) || X <- lists:seq(1,10)],
     timer:sleep(1000),

http://git-wip-us.apache.org/repos/asf/couchdb-lager/blob/be6a315e/src/lager_console_backend.erl
----------------------------------------------------------------------
diff --git a/src/lager_console_backend.erl b/src/lager_console_backend.erl
index 7cf8482..cf73d63 100644
--- a/src/lager_console_backend.erl
+++ b/src/lager_console_backend.erl
@@ -165,7 +165,7 @@ console_log_test_() ->
                 application:load(lager),
                 application:set_env(lager, handlers, []),
                 application:set_env(lager, error_logger_redirect, false),
-                application:start(lager),
+                lager:start(),
                 whereis(user)
         end,
         fun(User) ->
@@ -381,7 +381,7 @@ set_loglevel_test_() ->
                 application:load(lager),
                 application:set_env(lager, handlers, [{lager_console_backend, info}]),
                 application:set_env(lager, error_logger_redirect, false),
-                application:start(lager)
+                lager:start()
         end,
         fun(_) ->
                 application:stop(lager),

http://git-wip-us.apache.org/repos/asf/couchdb-lager/blob/be6a315e/src/lager_file_backend.erl
----------------------------------------------------------------------
diff --git a/src/lager_file_backend.erl b/src/lager_file_backend.erl
index 873adb7..779f8ad 100644
--- a/src/lager_file_backend.erl
+++ b/src/lager_file_backend.erl
@@ -469,7 +469,7 @@ filesystem_test_() ->
                 application:set_env(lager, handlers, [{lager_test_backend, info}]),
                 application:set_env(lager, error_logger_redirect, false),
                 application:set_env(lager, async_threshold, undefined),
-                application:start(lager)
+                lager:start()
         end,
         fun(_) ->
                 file:delete("test.log"),
@@ -716,7 +716,7 @@ formatting_test_() ->
                 application:load(lager),
                 application:set_env(lager, handlers, [{lager_test_backend, info}]),
                 application:set_env(lager, error_logger_redirect, false),
-                application:start(lager)
+                lager:start()
         end,
         fun(_) ->
                 file:delete("test.log"),

http://git-wip-us.apache.org/repos/asf/couchdb-lager/blob/be6a315e/src/lager_handler_watcher.erl
----------------------------------------------------------------------
diff --git a/src/lager_handler_watcher.erl b/src/lager_handler_watcher.erl
index ac34119..f4cc245 100644
--- a/src/lager_handler_watcher.erl
+++ b/src/lager_handler_watcher.erl
@@ -123,7 +123,7 @@ reinstall_on_initial_failure_test_() ->
                     application:set_env(lager, handlers, [{lager_test_backend, info}, {lager_crash_backend,
[from_now(2), undefined]}]),
                     application:set_env(lager, error_logger_redirect, false),
                     application:unset_env(lager, crash_log),
-                    application:start(lager),
+                    lager:start(),
                     try
                       ?assertEqual(1, lager_test_backend:count()),
                       {_Level, _Time, Message, _Metadata} = lager_test_backend:pop(),
@@ -149,7 +149,7 @@ reinstall_on_runtime_failure_test_() ->
                     application:set_env(lager, handlers, [{lager_test_backend, info}, {lager_crash_backend,
[undefined, from_now(5)]}]),
                     application:set_env(lager, error_logger_redirect, false),
                     application:unset_env(lager, crash_log),
-                    application:start(lager),
+                    lager:start(),
                     try
                         ?assertEqual(0, lager_test_backend:count()),
                         ?assert(lists:member(lager_crash_backend, gen_event:which_handlers(lager_event))),

http://git-wip-us.apache.org/repos/asf/couchdb-lager/blob/be6a315e/test/lager_test_backend.erl
----------------------------------------------------------------------
diff --git a/test/lager_test_backend.erl b/test/lager_test_backend.erl
index ce43020..c3e2329 100644
--- a/test/lager_test_backend.erl
+++ b/test/lager_test_backend.erl
@@ -441,7 +441,7 @@ lager_test_() ->
                         ?assertEqual(0, count()),
                         application:stop(lager),
                         application:set_env(lager, traces, [{lager_test_backend, [{foo, bar}],
debug}]),
-                        application:start(lager),
+                        lager:start(),
                         lager:debug([{foo, bar}], "hello world"),
                         ?assertEqual(1, count()),
                         application:unset_env(lager, traces),
@@ -608,7 +608,7 @@ error_logger_redirect_crash_test_() ->
                 application:load(lager),
                 application:set_env(lager, error_logger_redirect, true),
                 application:set_env(lager, handlers, [{?MODULE, error}]),
-                application:start(lager),
+                lager:start(),
                 crash:start()
         end,
 
@@ -655,7 +655,7 @@ error_logger_redirect_test_() ->
                 application:load(lager),
                 application:set_env(lager, error_logger_redirect, true),
                 application:set_env(lager, handlers, [{?MODULE, info}]),
-                application:start(lager),
+                lager:start(),
                 lager:log(error, self(), "flush flush"),
                 timer:sleep(100),
                 gen_event:call(lager_event, ?MODULE, flush)
@@ -1154,7 +1154,7 @@ async_threshold_test_() ->
                 application:set_env(lager, error_logger_redirect, false),
                 application:set_env(lager, async_threshold, 10),
                 application:set_env(lager, handlers, [{?MODULE, info}]),
-                application:start(lager)
+                lager:start()
         end,
         fun(_) ->
                 application:unset_env(lager, async_threshold),


Mime
View raw message