Details
-
New Feature
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
None
-
None
-
None
Description
Even though the current logging configuration in archetype is designed to keep context-based separate log files (e.g, hippo-cms.log for cms/repo application and hippo-site.log for site application), the current solution doesn't seem to provide the designed feature property.
For example, if you use hippo-repository-connector classes in an HST component, then you will see the logs generated by the
hippo-repository-connector classes in the hippo-cms.log file, not in the hippo-site.log file because default configuration for log4j is not so flexible and so it is strictly tied to the class/package names only.
------------------------------------
We can do the following with log4j:
- Add a simple MDC or JNDI based Filter in a hippo shared lib (See
'Log4JMDCFilter' example in [1] for detail).
(hippo-cms7-commons-x.x.x.jar) - I think JNDI based resource configuration should be better because it's safer in a separate thread as well.
- Set JNDI resource property in each web.xml
- Configure 'conditional logging' in the existing log4j.xml.