Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

supress logs

Avatar

Level 5

Hello All,

I see lot of repeated errors in the logs as below, few questions for it.

1, what are these logs about, is there any easy way to fix it?

2, suppress it or these entries should be skipped should not be logged in the error.log?

3, my error log level is ERROR but i still see WARN messages, can I restrict it to ERROR?

01.12.2018 12:04:03.215 *ERROR* [94.130.35.60 [1543662243210] GET /content/XXX/XXXXX/XXX.xml HTTP/1.1] org.apache.sling.servlets.get.impl.DefaultGetServlet No renderer for extension xml, cannot render resource /content/XXX/XXXXX/XXX/jcr:content

01.12.2018 12:04:31.111 *ERROR* [94.130.16.50 [1543662270471] GET /content/XXX/XXXXX/XXX.html HTTP/1.1] org.apache.sling.models.impl.ModelAdapterFactory Could not adapt to model

org.apache.sling.models.factory.MissingElementsException: Could not inject all required fields into class io.wcm.handler.url.impl.UrlHandlerImpl

Could not inject private org.apache.sling.api.adapter.Adaptable io.wcm.handler.url.impl.UrlHandlerImpl.self caused by Could not inject field due to reflection issues

Thanks,

Viki

1 Accepted Solution

Avatar

Correct answer by
Level 1

Hi Viki,

Please use resourceresolver, /system/console/jcrresolver, to resolve the URL and check

Adding a .xml extension triggers the default XML rendering, once again unless a more specific script or servlet is registered for the current resource.

That XML rendering currently uses the JCR "document view" export functionality directly, so it only supports rendering resources that are backed by JCR nodes.

sling-org-apache-sling-models-impl/ModelAdapterFactory.java at master · apache/sling-org-apache-slin...

Please find answers below for respective errors

/system/console/slinglog and create separate logger for the api, but please beware that all logs for these apis will log there.

Raise the “Log Level” threshold one step higher (from INFO to WARN)

There are 2 error.log, one with Root is advised to be at Info

For org.apache.sling.scripting.sightly.js.impl.jsapi.ProxyAsyncScriptableFactory, it is at ERROR

Please also follow this doc - Apache Sling :: Logging

View solution in original post

2 Replies

Avatar

Correct answer by
Level 1

Hi Viki,

Please use resourceresolver, /system/console/jcrresolver, to resolve the URL and check

Adding a .xml extension triggers the default XML rendering, once again unless a more specific script or servlet is registered for the current resource.

That XML rendering currently uses the JCR "document view" export functionality directly, so it only supports rendering resources that are backed by JCR nodes.

sling-org-apache-sling-models-impl/ModelAdapterFactory.java at master · apache/sling-org-apache-slin...

Please find answers below for respective errors

/system/console/slinglog and create separate logger for the api, but please beware that all logs for these apis will log there.

Raise the “Log Level” threshold one step higher (from INFO to WARN)

There are 2 error.log, one with Root is advised to be at Info

For org.apache.sling.scripting.sightly.js.impl.jsapi.ProxyAsyncScriptableFactory, it is at ERROR

Please also follow this doc - Apache Sling :: Logging