Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-14607

changing the log files, logging date display format. Currently logs are showing absolute time like (10:04:52,296 INFO) and we want to display like (Jan 6, 2011 6:47:33 AM)

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Completed
    • Affects Version/s: 5.2.3
    • Fix Version/s: 5.2.X EE
    • Component/s: ~[Archived] WCM
    • Labels:
      None
    • Environment:
      Liferay SP3 enterprise edition
    • Branch Version/s:
      5.2.x

      Description

      Hi Team,

      We need to change the log date and time displaying format.

      Currently in the log files, logs are displaying in the below format::::::
      10:04:54,843 INFO [ServerDetector:101] Detected server tomcat
      10:04:55,108 INFO [HotDeployUtil:68] Initializing hot deploy manager 15545618

      We have changed the log4j.properties under $TOMCAT/Webapps/ROOT/web-inf/classes/log4j.properties in local version (local version is Community Edition)

      log4j.rootCategory=INFO, CONSOLE

      log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
      log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
      log4j.appender.CONSOLE.layout.ConversionPattern=%d

      {MMM dd, yyyy HH:mm:ss:SSS}

      %-5p [%c

      {1}:%L] %m%n

      And with the above file modification, i am able to see the below log as required:::::

      Jan 6, 2011 6:47:33 AM INFO [ServerDetector:101] Detected server tomcat
      Jan 6, 2011 6:47:35 AM INFO [HotDeployUtil:68] Initializing hot deploy manager 15545618

      But in enterprise edition, we are unable to do the same.

      Even we modified the file, portal-log4j-ext.xml:::

      <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
      <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
      <layout class="org.apache.log4j.PatternLayout">
      <param name="ConversionPattern" value="%d{MMM dd, yyyy HH:mm:ss:SSS} %-5p [%c{1}

      :%L] %m%n" />
      </layout>
      </appender>
      </log4j:configuration>

      and we kept the above file under $TOMCAT/webapps\ROOT\WEB-INF\classes\META-INF. But no use.

      Can you suggest me where i need to do the above modificaition. Thanks.

      Regards,
      Srik

        Attachments

          Activity

            People

            Assignee:
            support-lep@liferay.com SE Support
            Reporter:
            avinash.seetharamu Avinash Seetharamu (Inactive)
            Participants of an Issue:
            Recent user:
            Esther Sanz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              3 years, 49 weeks, 1 day ago

                Packages

                Version Package
                5.2.X EE