Commit fd0bf45
committed
Validate
The `log.*.formatter.depth` mappings accept any integer, so a
misconfiguration such as `depth = 0` or a negative value passes schema
validation and is then silently clamped to 5. This is inconsistent with
the sibling `log.error_logger_format_depth` mapping, which rejects
non-positive values.
Add a `formatter_depth` validator that accepts `unlimited` or a positive
integer, and apply it to all four formatter depth mappings (console,
exchange, syslog, file). Document in `translate_generic_conf/2` that an
explicit depth is floored at 5, matching OTP's
`logger_formatter:get_depth/1`, so the clamp is no longer undocumented.log.*.formatter.depth and document its floor1 parent 05af8b8 commit fd0bf45
2 files changed
Lines changed: 16 additions & 5 deletions
File tree
- deps
- rabbitmq_prelaunch/src
- rabbit/priv/schema
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1661 | 1661 | | |
1662 | 1662 | | |
1663 | 1663 | | |
1664 | | - | |
| 1664 | + | |
| 1665 | + | |
1665 | 1666 | | |
1666 | 1667 | | |
1667 | 1668 | | |
| |||
1704 | 1705 | | |
1705 | 1706 | | |
1706 | 1707 | | |
1707 | | - | |
| 1708 | + | |
| 1709 | + | |
1708 | 1710 | | |
1709 | 1711 | | |
1710 | 1712 | | |
| |||
1763 | 1765 | | |
1764 | 1766 | | |
1765 | 1767 | | |
1766 | | - | |
| 1768 | + | |
| 1769 | + | |
1767 | 1770 | | |
1768 | 1771 | | |
1769 | 1772 | | |
| |||
2005 | 2008 | | |
2006 | 2009 | | |
2007 | 2010 | | |
2008 | | - | |
| 2011 | + | |
| 2012 | + | |
2009 | 2013 | | |
2010 | 2014 | | |
2011 | 2015 | | |
| |||
3122 | 3126 | | |
3123 | 3127 | | |
3124 | 3128 | | |
| 3129 | + | |
| 3130 | + | |
| 3131 | + | |
| 3132 | + | |
| 3133 | + | |
| 3134 | + | |
3125 | 3135 | | |
3126 | 3136 | | |
3127 | 3137 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
272 | | - | |
| 272 | + | |
| 273 | + | |
273 | 274 | | |
274 | 275 | | |
275 | 276 | | |
| |||
0 commit comments