[RORDEV-2016] Audit improvements#320
Conversation
📝 WalkthroughWalkthroughThis PR updates ChangesAudit Configuration and Event Serialization Documentation
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@details/audit.md`:
- Line 461: Update the audit docs to use the same log4j2.properties path as
other docs: replace the occurrence of "$ES_PATH_CONF/config/log4j2.properties"
in details/audit.md with "$ES_PATH_CONF/log4j2.properties" and keep the
surrounding guidance about matching the logger name to the logger_name value
(default readonlyrest_audit) intact so references remain consistent with
elasticsearch.md and the debug logging docs.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
|
|
||
| #### Custom logging settings via log4j2 | ||
|
|
||
| For advanced log configuration — custom patterns, external syslog appenders, etc. — configure the logger in `$ES_PATH_CONF/config/log4j2.properties`. The logger name must match the `logger_name` value in the output config (or the default `readonlyrest_audit`): |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Search for references to log4j2.properties path in documentation
rg -n "log4j2\.properties" -g "*.md" -C2Repository: beshu-tech/readonlyrest-docs
Length of output: 2315
🏁 Script executed:
#!/bin/bash
# List all occurrences of both path variants and print tight context
rg -n "\$ES_PATH_CONF/(config/)?log4j2\.properties" -g "*.md" -C2Repository: beshu-tech/readonlyrest-docs
Length of output: 54
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== occurrences of \$ES_PATH_CONF/config/log4j2.properties =="
rg -n "\$ES_PATH_CONF/config/log4j2\.properties" -g "*.md" -C2 || true
echo
echo "== occurrences of \$ES_PATH_CONF/log4j2.properties =="
rg -n "\$ES_PATH_CONF/log4j2\.properties" -g "*.md" -C2 || trueRepository: beshu-tech/readonlyrest-docs
Length of output: 186
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== occurrences of config/log4j2.properties (no $ prefix) =="
rg -n "config/log4j2\.properties" -g "*.md" -C2 || true
echo
echo "== occurrences of log4j2.properties (no config/) =="
rg -n "(^|[^/])log4j2\.properties" -g "*.md" -C2 || true
echo
echo "== show details/audit.md around line ~450-470 =="
nl -ba details/audit.md | sed -n '445,470p'
echo
echo "== show elasticsearch.md around line ~3000-3135 =="
nl -ba elasticsearch.md | sed -n '2985,3150p'Repository: beshu-tech/readonlyrest-docs
Length of output: 2138
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== details/audit.md around line 461 =="
awk 'NR>=452 && NR<=468 {printf "%d:%s\n", NR, $0}' details/audit.md
echo
echo "== elasticsearch.md around line 3010-3020 =="
awk 'NR>=3008 && NR<=3020 {printf "%d:%s\n", NR, $0}' elasticsearch.md
echo
echo "== elasticsearch.md around line 3110-3120 =="
awk 'NR>=3110 && NR<=3120 {printf "%d:%s\n", NR, $0}' elasticsearch.md
echo
echo "== elasticsearch.md around line 3122-3140 =="
awk 'NR>=3122 && NR<=3140 {printf "%d:%s\n", NR, $0}' elasticsearch.mdRepository: beshu-tech/readonlyrest-docs
Length of output: 2922
Align log4j2.properties path in audit docs
details/audit.mdpoints to$ES_PATH_CONF/config/log4j2.properties, but elsewhere in the docs (elasticsearch.md, debug logging) the path is$ES_PATH_CONF/log4j2.properties. Updatedetails/audit.mdto use the same documented path.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@details/audit.md` at line 461, Update the audit docs to use the same
log4j2.properties path as other docs: replace the occurrence of
"$ES_PATH_CONF/config/log4j2.properties" in details/audit.md with
"$ES_PATH_CONF/log4j2.properties" and keep the surrounding guidance about
matching the logger name to the logger_name value (default readonlyrest_audit)
intact so references remain consistent with elasticsearch.md and the debug
logging docs.
Summary by CodeRabbit