Uploaded image for project: 'Hippo Site Toolkit 2'
  1. Hippo Site Toolkit 2
  2. HSTTWO-1725

Too many warning logs with LocationMapResolver

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.22.04, 2.23.02
    • Component/s: None
    • Labels:
      None
    • Similar issues:

      Description

      Too many logs are found with LocationMapResolver as follows in gogreen demo:

      04.08.2011 22:09:46 WARN [org.hippoecm.hst.core.linking.LocationMapResolver.resolve():171] Unable to linkrewrite 'products/facetedproducts/Price/$ 0 - $ 25' to any sitemap item
      04.08.2011 22:09:46 WARN [org.hippoecm.hst.core.linking.LocationMapResolver.resolve():171] Unable to linkrewrite 'products/facetedproducts/Product Category/Reuse' to any sitemap item
      04.08.2011 22:09:46 WARN [org.hippoecm.hst.core.linking.LocationMapResolver.resolve():171] Unable to linkrewrite 'products/facetedproducts/Score/1 star or more' to any sitemap item

      However, it doesn't show real problem or error at all.
      Instead, because DefaultHstLinkCreator just tries to create link from candidate mounts, it just leaves the warning logs during the trials to find a proper mount.

      That is, DefaultHstLinkCreator.HstLinkResolver#resolve() tries to create a link from other candidate mounts
      In these look ups, it invokes DefaultHstLinkCreator#resolveToPathInfo(), which invokes LocationMapResolver#resolve().

      Because its look ups from a mount to another mount is just normal process, the log shouldn't be WARNING, but a DEBUG.

      Actually, DefaultHstLinkCreator.HstLinkResolver already leaves proper WARNING or ERROR logs already if not found as follows:

      if(linkInfo == null) {
      log.warn("Cannot create a link for node with path '{}'. Return a page not found link", nodePath);
      return pageNotFoundLink(mount);
      }

      Therefore, I will change the log level in LocationMapResolver to DEBUG.

        Attachments

          Activity

            People

            • Assignee:
              wko Woonsan Ko
              Reporter:
              wko Woonsan Ko
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: