Crowd catalina.out logs shows different date format at startup

Still need help?

The Atlassian Community is here for you.

Ask the community

Problem

At startup, Crowd shows logs in US formatting like Feb 14,201711:30:00 AM and then switches to standard formatting like 2017-02-14 11:30:00

See the following catalina.out logs as an example:

 

Feb 14, 2017 11:17:41 AM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /Users/sbrannen/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.
Feb 14, 2017 11:17:42 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8095"]
Feb 14, 2017 11:17:42 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 562 ms
Feb 14, 2017 11:17:42 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Feb 14, 2017 11:17:42 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.69
Feb 14, 2017 11:17:42 AM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor /Users/sbrannen/atlassian/crowd/crowd2101/install/apache-tomcat/conf/Catalina/localhost/crowd.xml
Feb 14, 2017 11:17:51 AM org.apache.catalina.startup.TldConfig execute
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
2017-02-14 11:17:51,410 localhost-startStop-1 INFO [ContainerBase.[Catalina].[localhost].[/crowd]] No Spring WebApplicationInitializer types detected on classpath
2017-02-14 11:17:51,410 localhost-startStop-1 INFO [ContainerBase.[Catalina].[localhost].[/crowd]] No Spring WebApplicationInitializer types detected on classpath
2017-02-14 11:17:52,508 localhost-startStop-1 WARN [com.atlassian.config.ApplicationConfig] Application home does not exist. Creating directory: /Users/sbrannen/atlassian/crowd/crowd2101/home
2017-02-14 11:17:52,508 localhost-startStop-1 WARN [com.atlassian.config.ApplicationConfig] Application home does not exist. Creating directory: /Users/sbrannen/atlassian/crowd/crowd2101/home

Diagnosis

Environment

  • Tomcat 7

Cause

Tomcat 7 by default bases the date formatting off of locale, this was changed in Tomcat 8. In Crowd, both Tomcat and log4j write to the catalina.out file which is why there is a mix of dates.

Resolution

  • Stop Crowd
  • Add the following to the end of <crowd-install>/apache-tomcat/conf/logging.properties

    # Added to change date/time format
    1catalina.java.util.logging.SimpleFormatter.format=%1$tF %1$tT %2$s%n%4$s: %5$s%6$s%n
  • Start Crowd

 

Last modified on Feb 14, 2017

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.