New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
log.file.rotation.date syntax supports a limited number of options compared to Lager #3831
Comments
parse_date_spec(false) ->
false;
parse_date_spec("") ->
false;
parse_date_spec([$$,$D | DateSpec]) ->
io:format(standard_error, "parse_date_spec: ~p (hour)~n", [DateSpec]),
parse_hour(DateSpec, #{every=>day,
hour=>0});
parse_date_spec([$$,$W | DateSpec]) ->
io:format(standard_error, "parse_date_spec: ~p (week)~n", [DateSpec]),
parse_day_of_week(DateSpec, #{every=>week,
hour=>0});
parse_date_spec([$$,$M | DateSpec]) ->
io:format(standard_error, "parse_date_spec: ~p (month)~n", [DateSpec]),
parse_day_of_month(DateSpec, #{every=>month,
hour=>0});
parse_date_spec(DateSpec) ->
io:format(standard_error, "parse_date_spec: ~p (error)~n", [DateSpec]),
error. @dumbbell is there a reason for that? The function logs to standard error, which for this setting doesn't seem to be necessary. |
The following examples from the doc fail with various function clauses. It's not specific to Debian: log.file.rotation.date = $W5D16 log.file.rotation.date = $H00 |
From the looks of some portions of the parser and docs, my guess is that the format documentation predates the standard OTP logger transition. All those values were supported by Lager but the current implementation is a lot more limited. |
https://rabbitmq.com/logging.html#log-rotation no longer documents what we do not support. On Linux, |
to successfully parse all cases presented in Lager docs. References #3831
Fixed by #3835 |
in config file the line
log.file.rotation.date = $D0
is working fine whereas the$D12H30
or anything other than day is causing a failure to start service. I'm usingrabbitmq-server=3.9.11-1
anderlang/bionic 1:24.1.7-1
and primary configuration file format.The error log :
The text was updated successfully, but these errors were encountered: