Skip to content

Instantly share code, notes, and snippets.

@deluan
Created September 30, 2010 21:34
Show Gist options
  • Save deluan/605359 to your computer and use it in GitHub Desktop.
Save deluan/605359 to your computer and use it in GitHub Desktop.
beans = {
log4jConfigurer(org.springframework.beans.factory.config.MethodInvokingFactoryBean) {
targetClass = "org.springframework.util.Log4jConfigurer"
targetMethod = "initLogging"
arguments = ["classpath:myapp/log4j.properties"]
}
...
}
<bean id="log4jConfigurer" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="targetClass"><value>org.springframework.util.Log4jConfigurer</value></property>
<property name="targetMethod"><value>initLogging</value></property>
<property name="arguments">
<list>
<value>classpath:myapp/log4j.properties</value>
<!-- or you could use an absolute path: <value>file:D:\\etc\\myapp\\log4j.properties</value> -->
</list>
</property>
</bean>
<filter-mapping>
<filter-name>sitemesh</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- Comment this out!
<listener>
<listener-class>org.codehaus.groovy.grails.web.util.Log4jConfigListener</listener-class>
</listener>
-->
<listener>
<listener-class>org.codehaus.groovy.grails.web.context.GrailsContextLoaderListener</listener-class>
</listener>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment