From 5c7a79fdf9f65a12714efd48faae1918c090881e Mon Sep 17 00:00:00 2001 From: Andrew Thompson Date: Sun, 30 Oct 2011 12:50:35 -0400 Subject: [PATCH] Don't create a crash log called 'undefined'. Closes #26 --- src/lager_sup.erl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lager_sup.erl b/src/lager_sup.erl index cec2da1..7c2b29b 100644 --- a/src/lager_sup.erl +++ b/src/lager_sup.erl @@ -40,6 +40,8 @@ init([]) -> %% check if the crash log is enabled Crash = case application:get_env(lager, crash_log) of + {ok, undefined} -> + []; {ok, File} -> MaxBytes = case application:get_env(lager, crash_log_msg_size) of {ok, Val} when is_integer(Val) andalso Val > 0 -> Val;