Skip to Content
author's profile photo Former Member
Former Member

Hybris 5.7 to Hybris 6 - log4j custom appender issue.

I have already gone through posts - https://answers.sap.com/questions/12758213/logs-log4j-in-hybris-6.html

and also https://help.hybris.com/6.0.0/hcd/42d818c7bac44eed9ab01757472b9dbc.html

From above page,

  1. Was able to get logs working through hybris-log4j2.xml - with RollingFile appenders, however this is not a cleaner solution. Moreover, I had to hardcode full / relative path to logs - can't use ${HYBRIS_LOG_DIR} environment variables in XML file. Even in non-clean solution like this, any idea - how to access environment variables in log4j2.xml file ?

  2. Cleaner solution is to define RollingFile appender in properties file. Above help hybris page has example of Console appender - "log4j2.logger.hmc.name" but not for RollingFile appender. Any help here would be very helpful.

  3. Hybris still keeps the log4j.x.y. properties in core project.properties like platform (check performance.log), however it seems to be not working - means logs are not written/output in those files. Is it a bug/ am I missing something ?

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jul 21, 2016 at 10:21 AM

    · 15 hours ago Posted answer @ http://answers.sap.com/answers/12789119/view.html

    Putting again to mark it as answered.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.