Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix custom formatter spec for lager_file_backend (version 2)

  • Loading branch information...
commit 9151da2306267f44b4ea8c36efc6b321afbb9c81 1 parent d648264
@lukyanov lukyanov authored
Showing with 6 additions and 6 deletions.
  1. +6 −6 src/lager_app.erl
View
12 src/lager_app.erl
@@ -88,8 +88,8 @@ to_config({Name,Severity}) ->
{{lager_file_backend, Name}, {Name, Severity}};
to_config({Name,_Severity,_Size,_Rotation,_Count}=Config) ->
{{lager_file_backend, Name}, Config};
-to_config({Name,Severity,Size,Rotation,Count,Format}) ->
- {{lager_file_backend, Name}, {Name,Severity,Size,Rotation,Count},Format}.
+to_config([{Name,_Severity,_Size,_Rotation,_Count}, _Format] = Config) ->
+ {{lager_file_backend, Name}, Config}.
@@ -109,11 +109,11 @@ application_config_mangling_test_() ->
))},
{"Explode with formatter info",
?_assertMatch(
- [{{lager_file_backend,"test.log"}, {"test.log", debug, 10485760, "$D0", 5},{lager_default_formatter,["[",severity,"] ", message, "\n"]}},
- {{lager_file_backend,"test2.log"}, {"test2.log",debug, 10485760, "$D0", 5},{lager_default_formatter,["2>[",severity,"] ", message, "\n"]}}],
+ [{{lager_file_backend,"test.log"}, [{"test.log", debug, 10485760, "$D0", 5},{lager_default_formatter,["[",severity,"] ", message, "\n"]}]},
+ {{lager_file_backend,"test2.log"}, [{"test2.log",debug, 10485760, "$D0", 5},{lager_default_formatter,["2>[",severity,"] ", message, "\n"]}]}],
expand_handlers([{lager_file_backend, [
- {"test.log", debug, 10485760, "$D0", 5,{lager_default_formatter,["[",severity,"] ", message, "\n"]}},
- {"test2.log",debug, 10485760, "$D0", 5,{lager_default_formatter,["2>[",severity,"] ",message, "\n"]}}
+ [{"test.log", debug, 10485760, "$D0", 5},{lager_default_formatter,["[",severity,"] ", message, "\n"]}],
+ [{"test2.log",debug, 10485760, "$D0", 5},{lager_default_formatter,["2>[",severity,"] ",message, "\n"]}]
]
}])
)
Please sign in to comment.
Something went wrong with that request. Please try again.