Index: components/core/src/main/java/org/hippoecm/hst/core/sitemenu/HstSiteMenuItemImpl.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- components/core/src/main/java/org/hippoecm/hst/core/sitemenu/HstSiteMenuItemImpl.java	(revision 32515)
+++ components/core/src/main/java/org/hippoecm/hst/core/sitemenu/HstSiteMenuItemImpl.java	(revision )
@@ -1,12 +1,12 @@
 /*
  *  Copyright 2008 Hippo.
- * 
+ *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
  *  You may obtain a copy of the License at
- * 
+ *
  *       http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  *  Unless required by applicable law or agreed to in writing, software
  *  distributed under the License is distributed on an "AS IS" BASIS,
  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -35,7 +35,7 @@
 import org.slf4j.LoggerFactory;
 
 public class HstSiteMenuItemImpl extends AbstractMenuItem implements HstSiteMenuItem {
-    
+
     private static Logger log = LoggerFactory.getLogger(HstSiteMenuItemImpl.class);
 
     private HstSiteMenu hstSiteMenu;
@@ -48,8 +48,8 @@
     private String hstSiteMapItemPath;
     private String externalLink;
     private Mount targetMount;
-    
-    
+
+
     public HstSiteMenuItemImpl(HstSiteMenu hstSiteMenu, HstSiteMenuItem parent, HstSiteMenuItemConfiguration hstSiteMenuItemConfiguration, HstRequestContext hstRequestContext) {
         this.hstSiteMenu = hstSiteMenu;
         this.parent = parent;
@@ -62,20 +62,20 @@
         this.properties = hstSiteMenuItemConfiguration.getProperties();
         // if there is an hst:mountalias, we use the mount belonging to that alias. If there is no mount alias defined,
         // we use the mount from the request context
-        
+
         if (hstSiteMenuItemConfiguration.getMountAlias() != null) {
             targetMount = hstRequestContext.getMount(hstSiteMenuItemConfiguration.getMountAlias());
             if(targetMount == null) {
-                log.warn("Cannot create links for SiteMenuItem '"+hstSiteMenu.getName()+"' because could not lookup mount with alias '{}' for current mount '{}'", hstSiteMenuItemConfiguration.getMountAlias(), hstRequestContext.getResolvedMount().getMount());
+                log.warn("Cannot create links for sitemenu item '"+name+"' of menu '"+hstSiteMenu.getName()+"' because could not lookup mount with alias '{}' for current mount '{}'", hstSiteMenuItemConfiguration.getMountAlias(), hstRequestContext.getResolvedMount().getMount());
             }
         } else {
             targetMount = hstRequestContext.getResolvedMount().getMount();
         }
         String siteMapItemRefIdOrPath = PathUtils.normalizePath(hstSiteMenuItemConfiguration.getSiteMapItemPath());
-        
+
         if (targetMount != null) {
             HstSiteMapItem siteMapItemByRefId = targetMount.getHstSite().getSiteMap().getSiteMapItemByRefId(siteMapItemRefIdOrPath);
-            
+
             if (siteMapItemByRefId != null) {
                 hstSiteMapItemRefId = siteMapItemRefIdOrPath;
                 hstSiteMapItemPath = HstSiteMapUtils.getPath(siteMapItemByRefId);
@@ -89,26 +89,26 @@
                 }
             }
         }
-        
+
         for(HstSiteMenuItemConfiguration childItemConfiguration : hstSiteMenuItemConfiguration.getChildItemConfigurations()) {
             hstSiteMenuItems.add(new HstSiteMenuItemImpl(hstSiteMenu, this, childItemConfiguration, hstRequestContext));
         }
         resolvedSiteMapItem = hstRequestContext.getResolvedSiteMapItem();
-        
+
         String currentPathInfo = resolvedSiteMapItem.getPathInfo();
-        
+
         if (hstSiteMapItemPath != null && currentPathInfo != null) {
-            
+
             if (hstSiteMapItemPath.equals(currentPathInfo)) {
                 // the current HstSiteMenuItem is selected. Set it to selected, and also set all the ancestors selected
                 this.selected = true;
                 ((HstSiteMenuImpl)hstSiteMenu).setSelectedSiteMenuItem(this);
             }
-             
+
             if(currentPathInfo.startsWith(hstSiteMapItemPath)) {
                 // check if the match was until a slash, otherwise it is not a sitemenu item we want to expand
                 String sub = currentPathInfo.substring(hstSiteMapItemPath.length());
-                
+
                 if("".equals(sub) || sub.startsWith("/")) {
                     // not selected but expand all ancestors
                     this.expanded = true;
@@ -129,7 +129,7 @@
 
     public HstLink getHstLink() {
         if(targetMount == null) {
-            log.warn("Cannot create link for sitemenu item '{}' because target mount is null. Return null", hstSiteMenu.getName());
+            log.warn("Cannot create link for sitemenu item '{}' of menu '{}' because target mount is null. Return null", name, hstSiteMenu.getName());
             return null;
         }
         if (hstSiteMapItemRefId != null) {
@@ -138,11 +138,11 @@
             return linkCreator.create(hstSiteMapItemPath, targetMount);
         }
         if (externalLink == null) {
-            log.warn("Sitemenu item '{}' does not contain an hstSiteMapItemRefId, an hstSiteMapItemPath or an externalLink. Cannot create link for sitemenu item, return null", hstSiteMenu.getName());
+            log.warn("Sitemenu item '{}' of menu '{}' does not contain an hstSiteMapItemRefId, an hstSiteMapItemPath or an externalLink. Cannot create link for sitemenu item, return null", name, hstSiteMenu.getName());
         }
         return null;
     }
-    
+
     public String getExternalLink() {
         return this.externalLink;
     }
@@ -150,7 +150,7 @@
     public HstSiteMenuItem getParentItem() {
         return this.parent;
     }
-    
+
     public void setExpanded(){
        this.expanded = true;
        if (this.parent == null) {
@@ -160,7 +160,7 @@
            ((HstSiteMenuItemImpl) this.parent).setExpanded();
        }
     }
-    
+
     public HstSiteMenu getHstSiteMenu() {
         return this.hstSiteMenu;
     }
@@ -172,7 +172,7 @@
     public boolean isRepositoryBased() {
         return this.repositoryBased;
     }
-    
+
     public HstSiteMenuItem getDeepestExpandedItem(){
         for(HstSiteMenuItem item : hstSiteMenuItems) {
             if(item.isExpanded()) {
@@ -196,15 +196,15 @@
         }
         return parameters;
     }
-    
-   
+
+
     public String getParameter(String name) {
         String paramValue = hstSiteMenuItemConfiguration.getParameter(name);
         PropertyParser pp = new PropertyParser(resolvedSiteMapItem.getParameters());
         String parsedParamValue = (String)pp.resolveProperty(name, paramValue);
         return parsedParamValue;
     }
-    
+
     public Map<String,String> getLocalParameters() {
         Map<String,String> parameters = new HashMap<String, String>();
         PropertyParser pp = new PropertyParser(resolvedSiteMapItem.getParameters());
@@ -214,7 +214,7 @@
         }
         return parameters;
     }
-    
+
     public String getLocalParameter(String name) {
         String paramValue = hstSiteMenuItemConfiguration.getLocalParameter(name);
         PropertyParser pp = new PropertyParser(resolvedSiteMapItem.getParameters());
