Skip to content

Commit

Permalink
Cleanup logging
Browse files Browse the repository at this point in the history
  • Loading branch information
denis-yuen committed Oct 28, 2016
1 parent f0c1cdd commit a71684c
Show file tree
Hide file tree
Showing 9 changed files with 110 additions and 10 deletions.
11 changes: 6 additions & 5 deletions consonance-arch/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,6 @@
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
Expand Down Expand Up @@ -307,6 +303,11 @@
<artifactId>commons-vfs2</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<optional>true</optional>
</dependency>
</dependencies>

<build>
Expand All @@ -317,6 +318,7 @@
<usedDependencies>
<usedDependency>org.apache.commons:commons-pool2</usedDependency>
<usedDependency>org.apache.commons:commons-vfs2</usedDependency>
<usedDependency>ch.qos.logback:logback-classic</usedDependency>
</usedDependencies>
</configuration>
</plugin>
Expand All @@ -329,7 +331,6 @@
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>logback.xml</exclude>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
Expand Down
36 changes: 36 additions & 0 deletions consonance-arch/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<!--
~ Consonance - workflow software for multiple clouds
~ Copyright (C) 2016 OICR
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
~
-->

<configuration>

<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<!-- encoders are assigned the type
ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>WARN</level>
</filter>
</appender>

<root level="info">
<appender-ref ref="STDOUT" />
</root>
</configuration>
6 changes: 6 additions & 0 deletions consonance-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,11 @@
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<optional>true</optional>
</dependency>
</dependencies>

<build>
Expand Down Expand Up @@ -223,6 +228,7 @@
<usedDependency>joda-time:joda-time</usedDependency>
<!-- needed as part of excluding gson 2.7 from dependency since it breaks jclouds -->
<usedDependency>com.google.code.gson:gson</usedDependency>
<usedDependency>ch.qos.logback:logback-classic</usedDependency>
</usedDependencies>
</configuration>
</execution>
Expand Down
36 changes: 36 additions & 0 deletions consonance-client/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<!--
~ Consonance - workflow software for multiple clouds
~ Copyright (C) 2016 OICR
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
~
-->

<configuration>

<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<!-- encoders are assigned the type
ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>WARN</level>
</filter>
</appender>

<root level="info">
<appender-ref ref="STDOUT" />
</root>
</configuration>
10 changes: 10 additions & 0 deletions consonance-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,16 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<excludes>
<exclude>**/logback.xml</exclude>
<exclude>**/logback-test.xml</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>

Expand Down
10 changes: 10 additions & 0 deletions consonance-server-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,16 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<excludes>
<exclude>**/logback.xml</exclude>
<exclude>**/logback-test.xml</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>

Expand Down
2 changes: 1 addition & 1 deletion container-admin/config.template
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ check_previous_job_hash = false
[provision]
max_running_containers = 5
youxia_deployer_parameters = --max-spot-price 0.01 --batch-size 1 --total-nodes-num 1 --ansible-playbook /container-host-bag/install.yml -e /container-host-bag/example_params.json --server-tag-file /container-host-bag/example_tags.json
youxia_reaper_parameters = --test
youxia_reaper_parameters =
5 changes: 5 additions & 0 deletions container-admin/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ services:
- provisioner
volumes:
- log_volume:/consonance_logs
environment:
- PGHOST=postgres
- PGUSER=postgres
- PGPASSWORD=postgres
- PGDATABASE=postgres

volumes:
log_volume:
4 changes: 0 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -765,10 +765,6 @@
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
<configuration>
<excludes>
<exclude>**/logback.xml</exclude>
<exclude>**/logback-test.xml</exclude>
</excludes>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
Expand Down

0 comments on commit a71684c

Please sign in to comment.