Explorar el Código

Add a simple test for persistent traces

pull/137/head
Andrew Thompson hace 12 años
padre
commit
a9a26b0e1d
Se han modificado 1 ficheros con 14 adiciones y 0 borrados
  1. +14
    -0
      test/lager_test_backend.erl

+ 14
- 0
test/lager_test_backend.erl Ver fichero

@ -434,6 +434,20 @@ lager_test_() ->
ok
end
},
{"persistent traces work",
fun() ->
?assertEqual(0, count()),
lager:debug([{foo, bar}], "hello world"),
?assertEqual(0, count()),
application:stop(lager),
application:set_env(lager, traces, [{lager_test_backend, [{foo, bar}], debug}]),
application:start(lager),
lager:debug([{foo, bar}], "hello world"),
?assertEqual(1, count()),
application:unset_env(lager, traces),
ok
end
},
{"tracing honors loglevel",
fun() ->
lager:set_loglevel(?MODULE, error),

Cargando…
Cancelar
Guardar