Add compress option for file rotation
Related to #3835 https://www.erlang.org/doc/man/logger_std_h.html
This commit is contained in:
parent
e1cd4673cc
commit
bf70e41c09
|
@ -1700,6 +1700,10 @@ end}.
|
|||
{mapping, "log.file.rotation.date", "rabbit.log.file.date", [
|
||||
{datatype, string}
|
||||
]}.
|
||||
{mapping, "log.file.rotation.compress", "rabbit.log.file.compress", [
|
||||
{default, false},
|
||||
{datatype, {enum, [true, false]}}
|
||||
]}.
|
||||
{mapping, "log.file.rotation.size", "rabbit.log.file.size", [
|
||||
{datatype, integer}
|
||||
]}.
|
||||
|
|
|
@ -697,6 +697,11 @@ normalize_main_file_output1(
|
|||
#{config := Config} = Output, Outputs) ->
|
||||
Output1 = Output#{config => Config#{rotate_on_date => DateSpec}},
|
||||
normalize_main_file_output1(Rest, Output1, Outputs);
|
||||
normalize_main_file_output1(
|
||||
[{compress, Compress} | Rest],
|
||||
#{config := Config} = Output, Outputs) ->
|
||||
Output1 = Output#{config => Config#{compress_on_rotate => Compress}},
|
||||
normalize_main_file_output1(Rest, Output1, Outputs);
|
||||
normalize_main_file_output1(
|
||||
[{size, Size} | Rest],
|
||||
#{config := Config} = Output, Outputs) ->
|
||||
|
|
Loading…
Reference in New Issue