You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by re...@apache.org on 2025/08/29 14:34:06 UTC
(sling-org-apache-sling-resourceresolver) branch SLING-12910 created (now dc776be5)
This is an automated email from the ASF dual-hosted git repository.
reschke pushed a change to branch SLING-12910
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-resourceresolver.git
at dc776be5 SLING-12910: ResourceResolver: log all alias/vanity settings on startup
This branch includes the following new commits:
new dc776be5 SLING-12910: ResourceResolver: log all alias/vanity settings on startup
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(sling-org-apache-sling-resourceresolver) 01/01: SLING-12910: ResourceResolver: log all alias/vanity settings on startup
Posted by re...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
reschke pushed a commit to branch SLING-12910
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-resourceresolver.git
commit dc776be55e1e0ea7672cc1a9f6cf07529b233465
Author: Julian Reschke <ju...@gmx.de>
AuthorDate: Fri Aug 29 15:33:47 2025 +0100
SLING-12910: ResourceResolver: log all alias/vanity settings on startup
---
.../resourceresolver/impl/mapping/AliasHandler.java | 20 +++++++++++++++-----
.../impl/mapping/VanityPathHandler.java | 21 +++++++++++++++++++++
2 files changed, 36 insertions(+), 5 deletions(-)
diff --git a/src/main/java/org/apache/sling/resourceresolver/impl/mapping/AliasHandler.java b/src/main/java/org/apache/sling/resourceresolver/impl/mapping/AliasHandler.java
index b8b3e961..e4faf8fd 100644
--- a/src/main/java/org/apache/sling/resourceresolver/impl/mapping/AliasHandler.java
+++ b/src/main/java/org/apache/sling/resourceresolver/impl/mapping/AliasHandler.java
@@ -131,12 +131,22 @@ class AliasHandler {
// the map here
this.aliasMapsMap = UNITIALIZED_MAP;
- try {
- // already disposed?
- if (this.factory == null) {
- return;
- }
+ // already disposed?
+ if (this.factory == null) {
+ log.error("Can't initialize aliases when MapConfigurationProvider is null");
+ return;
+ }
+ log.info(
+ "Initializing Aliases ({}={}, {}={}, {}={})",
+ "alias_cache_in_background",
+ this.factory.isAliasCacheInitInBackground(),
+ "optimize_alias_resolution",
+ this.factory.isOptimizeAliasResolutionEnabled(),
+ "allowed_alias_locations",
+ this.factory.getAllowedAliasLocations());
+
+ try {
aliasesProcessed.set(false);
if (this.factory.isOptimizeAliasResolutionEnabled()) {
diff --git a/src/main/java/org/apache/sling/resourceresolver/impl/mapping/VanityPathHandler.java b/src/main/java/org/apache/sling/resourceresolver/impl/mapping/VanityPathHandler.java
index 8e83be5c..bd96990d 100644
--- a/src/main/java/org/apache/sling/resourceresolver/impl/mapping/VanityPathHandler.java
+++ b/src/main/java/org/apache/sling/resourceresolver/impl/mapping/VanityPathHandler.java
@@ -121,7 +121,28 @@ public class VanityPathHandler {
* been null-ed.
*/
protected void initializeVanityPaths() {
+
this.initializing.lock();
+
+ // already disposed?
+ if (this.factory == null) {
+ log.error("Can't initialize vanity paths when MapConfigurationProvider is null");
+ return;
+ }
+
+ log.info(
+ "Initializing Vanity Paths ({}={}, {}={}, {}={}, {}={}, {}={})",
+ "enable_vanitypath",
+ this.factory.isVanityPathEnabled(),
+ "vanitypath_cache_in_background",
+ this.factory.isVanityPathCacheInitInBackground(),
+ "vanitypath_maxEntries",
+ this.factory.getMaxCachedVanityPathEntries(),
+ "vanitypath_(allowlist/denylist)",
+ this.factory.getVanityPathConfig(),
+ "vanitypath_bloomfilter_maxBytes",
+ this.factory.getVanityBloomFilterMaxBytes());
+
try {
if (this.factory.isVanityPathEnabled()) {
vanityPathsProcessed.set(false);