forked from ISTI-ansible-roles/ansible-roles
Thredds: configure the correct log directory, remove all the old logs entries. See https://support.d4science.org/issues/12990
This commit is contained in:
parent
01b4af1673
commit
f6feef6256
|
@ -22,7 +22,7 @@
|
|||
register: thredds_skip_conf
|
||||
tags: [ 'thredds', 'tomcat', 'thredds_conf' ]
|
||||
|
||||
- name: Install the Thredds configuration files
|
||||
- name: Install the Thredds data configuration files
|
||||
template: src={{ item[1] }}.j2 dest={{ thredds_data_content_dir }}/thredds/{{ item[1] }} owner={{ item.0.user }} group={{ item.0.user }} mode=644
|
||||
with_nested:
|
||||
- '{{ tomcat_m_instances }}'
|
||||
|
@ -66,12 +66,17 @@
|
|||
with_items: '{{ tomcat_m_instances }}'
|
||||
notify: tomcat instances restart
|
||||
|
||||
- name: Install the Thredds configuration files
|
||||
- name: Install the Thredds webapp configuration files
|
||||
template: src=web.xml.j2 dest={{ item.instance_path }}/webapps/{{ thredds_app_name | lower }}/WEB-INF/web.xml owner={{ item.user }} group={{ item.user }} mode=644
|
||||
with_items: '{{ tomcat_m_instances }}'
|
||||
notify: tomcat instances restart
|
||||
tags: [ 'thredds', 'tomcat', 'thredds_conf', 'thredds_webxml' ]
|
||||
|
||||
- name: Install the Thredds log4j configuration file
|
||||
template: src=log4j2.xml.j2 dest={{ item.instance_path }}/webapps/{{ thredds_app_name | lower }}/WEB-INF/classes/log4j2.xml owner=root group=root mode=0444
|
||||
with_items: '{{ tomcat_m_instances }}'
|
||||
tags: [ 'thredds', 'tomcat', 'thredds_conf', 'thredds_log4j' ]
|
||||
|
||||
when: thredds_install
|
||||
tags: [ 'thredds', 'tomcat' ]
|
||||
|
||||
|
|
|
@ -0,0 +1,219 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration monitorInterval="30">
|
||||
<properties>
|
||||
<property name="tds.content.root.path">../content</property>
|
||||
<property name="tds.log.dir">{{ item.instance_path }}/logs/thredds</property>
|
||||
</properties>
|
||||
|
||||
<appenders>
|
||||
|
||||
<File name="serverStartupAppender" fileName="${tds.log.dir}/serverStartup.log" append="false">
|
||||
<PatternLayout pattern="%d{yyyy-MM-dd'T'HH:mm:ss.SSSZ} [%10r][%8X{ID}] %-5p %c: %m%n"/>
|
||||
</File>
|
||||
|
||||
<File name="catalogInit" fileName="${tds.log.dir}/catalogInit.log" append="false">
|
||||
<PatternLayout pattern="%m%n"/>
|
||||
</File>
|
||||
|
||||
<File name="httpout" fileName="${tds.log.dir}/httpout.log" append="false">
|
||||
<PatternLayout pattern="%d %c: %m%n"/>
|
||||
</File>
|
||||
|
||||
<RollingFile name="fcScan" fileName="${tds.log.dir}/featureCollectionScan.log" filePattern="${tds.log.dir}/featureCollectionScan.%i.log">
|
||||
<PatternLayout pattern="[%d{yyyy-MM-dd'T'HH:mm:ss.SSSZ}] %-5p %c: %m%n"/>
|
||||
<Policies>
|
||||
<SizeBasedTriggeringPolicy size="1 MB"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="10"/>
|
||||
</RollingFile>
|
||||
|
||||
<RollingFile name="fmrc" fileName="${tds.log.dir}/fmrc.log" filePattern="${tds.log.dir}/fmrc.%i.log">
|
||||
<PatternLayout pattern="[%d{yyyy-MM-dd'T'HH:mm:ss.SSSZ}] %-5p %c: %m%n"/>
|
||||
<Policies>
|
||||
<SizeBasedTriggeringPolicy size="1 MB"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="10"/>
|
||||
</RollingFile>
|
||||
|
||||
<!-- RollingFile name="fc" fileName="${tds.log.dir}/fc.$${map:collectionName}.log" filePattern="${tds.log.dir}/fc.$${map:collectionName}.%i.log">
|
||||
<PatternLayout pattern="%d{yyyy-MM-dd'T'HH:mm:ss.SSS Z} %-5p - %m%n"/>
|
||||
<Policies>
|
||||
<SizeBasedTriggeringPolicy size="1 MB"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="10"/>
|
||||
</RollingFile -->
|
||||
|
||||
<RollingFile name="threddsServlet" fileName="${tds.log.dir}/threddsServlet.log" filePattern="${tds.log.dir}/threddsServlet.%d{yyyy-MM-dd-HH}.log">
|
||||
<PatternLayout pattern="%d{yyyy-MM-dd'T'HH:mm:ss.SSS Z} [%10r][%8X{ID}] %-5p - %c - %m%n"/>
|
||||
<Policies>
|
||||
<TimeBasedTriggeringPolicy/>
|
||||
<SizeBasedTriggeringPolicy size="100 MB"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="10"/>
|
||||
</RollingFile>
|
||||
|
||||
<RollingFile name="cacheLog" fileName="${tds.log.dir}/cache.log" filePattern="${tds.log.dir}/cache.%i.log">
|
||||
<PatternLayout pattern="[%d{yyyy-MM-dd'T'HH:mm:ss.SSSZ}] %m%n"/>
|
||||
<Policies>
|
||||
<SizeBasedTriggeringPolicy size="1 MB"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="3"/>
|
||||
</RollingFile>
|
||||
|
||||
<Console name="console" target="SYSTEM_OUT">
|
||||
<PatternLayout pattern="%d{yyyy-MM-dd'T'HH:mm:ss.SSSZ} [%10r][%8X{ID}] %-5p %c: %m%n"/>
|
||||
</Console>
|
||||
|
||||
</appenders>
|
||||
|
||||
<loggers>
|
||||
|
||||
<logger name="serverStartup" level="info" additivity="false">
|
||||
<appender-ref ref="serverStartupAppender"/>
|
||||
</logger>
|
||||
|
||||
<logger name="thredds.servlet.DataRootHandler.catalogInit" level="debug" additivity="false">
|
||||
<appender-ref ref="catalogInit"/>
|
||||
</logger>
|
||||
|
||||
<logger name="thredds.catalog.parser" level="info" additivity="false">
|
||||
<appender-ref ref="catalogInit"/>
|
||||
</logger>
|
||||
|
||||
<logger name="thredds.featurecollection.FeatureCollectionConfig" level="info" additivity="false">
|
||||
<appender-ref ref="catalogInit"/>
|
||||
</logger>
|
||||
|
||||
<logger name="ucar.nc2.thredds.MetadataExtractorAcdd" level="info" additivity="false">
|
||||
<appender-ref ref="catalogInit"/>
|
||||
</logger>
|
||||
|
||||
<logger name="thredds.catalog.InvDatasetFeatureCollection.catalogInit" level="info" additivity="false">
|
||||
<appender-ref ref="catalogInit"/>
|
||||
</logger>
|
||||
|
||||
<logger name="thredds.catalog.InvDatasetFeatureCollection.catalogInit" level="info" additivity="false">
|
||||
<appender-ref ref="catalogInit"/>
|
||||
</logger>
|
||||
|
||||
<logger name="thredds.server.config.TdsContext.catalogInit" level="info" additivity="false">
|
||||
<appender-ref ref="catalogInit"/>
|
||||
</logger>
|
||||
|
||||
<logger name="cacheLogger" level="info" additivity="false">
|
||||
<appender-ref ref="cacheLog"/>
|
||||
</logger>
|
||||
|
||||
<logger name="thredds.filesystem.CacheManager" level="info" additivity="false">
|
||||
<appender-ref ref="cacheLog"/>
|
||||
</logger>
|
||||
|
||||
<!-- fmrc -->
|
||||
<logger name="ucar.nc2.ft.fmrc" level="info" additivity="false">
|
||||
<appender-ref ref="fmrc"/>
|
||||
</logger>
|
||||
|
||||
<logger name="thredds.catalog.InvDatasetFcFmrc" level="info" additivity="false">
|
||||
<appender-ref ref="fmrc"/>
|
||||
</logger>
|
||||
|
||||
<logger name="thredds.servlet.DataRootHandler.fcScan" level="info" additivity="false">
|
||||
<appender-ref ref="fmrc"/>
|
||||
</logger>
|
||||
|
||||
<logger name="thredds.inventory.CollectionManagerAbstract" level="info" additivity="false">
|
||||
<appender-ref ref="fmrc"/>
|
||||
</logger>
|
||||
|
||||
<logger name="thredds.inventory.bdb.MetadataManager" level="warn" additivity="false">
|
||||
<appender-ref ref="fmrc"/>
|
||||
</logger>
|
||||
|
||||
<!-- featureCollection -->
|
||||
<logger name="featureCollectionScan" level="info" additivity="false">
|
||||
<appender-ref ref="fcScan"/>
|
||||
</logger>
|
||||
|
||||
<logger name="thredds.inventory.MFileCollectionManager" level="info" additivity="false">
|
||||
<appender-ref ref="fcScan"/>
|
||||
</logger>
|
||||
|
||||
<logger name="thredds.inventory.CollectionUpdater" level="info" additivity="false">
|
||||
<appender-ref ref="fcScan"/>
|
||||
</logger>
|
||||
|
||||
<logger name="thredds.server.admin.CollectionController" level="info" additivity="false">
|
||||
<appender-ref ref="fcScan"/>
|
||||
</logger>
|
||||
|
||||
<logger name="ucar.nc2.grib" level="info" additivity="false">
|
||||
<appender-ref ref="fcScan"/>
|
||||
</logger>
|
||||
|
||||
<logger name="ucar.nc2.grib.grib1.builder.Grib1CollectionBuilder" level="info" additivity="false">
|
||||
<appender-ref ref="fcScan"/>
|
||||
</logger>
|
||||
|
||||
<logger name="ucar.nc2.grib.grib2.builder.Grib2CollectionBuilder" level="info" additivity="false">
|
||||
<appender-ref ref="fcScan"/>
|
||||
</logger>
|
||||
|
||||
<logger name="thredds.catalog.InvDatasetFeatureCollection" level="info" additivity="false">
|
||||
<appender-ref ref="fcScan"/>
|
||||
</logger>
|
||||
|
||||
<logger name="thredds.catalog.InvDatasetFcGrib" level="info" additivity="false">
|
||||
<appender-ref ref="fcScan"/>
|
||||
</logger>
|
||||
|
||||
<logger name="org.quartz" level="warn" additivity="false">
|
||||
<appender-ref ref="fcScan"/>
|
||||
</logger>
|
||||
|
||||
<!-- WMS stuff has routine higher level of messages -->
|
||||
<logger name="uk.ac.rdg.resc.ncwms" level="warn" additivity="false">
|
||||
<appender-ref ref="threddsServlet"/>
|
||||
</logger>
|
||||
|
||||
<logger name="thredds.server.wms.responses" level="warn" additivity="false">
|
||||
<appender-ref ref="threddsServlet"/>
|
||||
</logger>
|
||||
|
||||
<logger name="thredds.server.metadata" level="warn" additivity="false">
|
||||
<appender-ref ref="threddsServlet"/>
|
||||
</logger>
|
||||
|
||||
<logger name="org.springframework.beans.factory" level="info" additivity="false">
|
||||
<appender-ref ref="serverStartupAppender"/>
|
||||
</logger>
|
||||
|
||||
<logger name="org.springframework.http" level="info" additivity="false">
|
||||
<appender-ref ref="threddsServlet"/>
|
||||
</logger>
|
||||
|
||||
<logger name="org.springframework.web" level="info" additivity="false">
|
||||
<appender-ref ref="serverStartupAppender"/>
|
||||
</logger>
|
||||
|
||||
<logger name="org.springframework" level="info" additivity="false">
|
||||
<appender-ref ref="serverStartupAppender"/>
|
||||
</logger>
|
||||
|
||||
<!-- =========================================== -->
|
||||
|
||||
<logger name="thredds.catalog.XMLEntityResolver" level="info" additivity="false">
|
||||
<appender-ref ref="httpout"/>
|
||||
</logger>
|
||||
|
||||
<logger name="org.apache.http.impl.conn" level="info" additivity="false">
|
||||
<appender-ref ref="httpout"/>
|
||||
</logger>
|
||||
|
||||
<!-- All normal logging messages go to threddsServlet.log -->
|
||||
<root level="info" additivity="false">
|
||||
<appender-ref ref="threddsServlet"/>
|
||||
</root>
|
||||
|
||||
</loggers>
|
||||
|
||||
</configuration>
|
Loading…
Reference in New Issue