Skip to content
This repository has been archived by the owner on Jul 4, 2024. It is now read-only.

Commit

Permalink
log config added
Browse files Browse the repository at this point in the history
  • Loading branch information
unknown authored and unknown committed Jan 5, 2016
1 parent 3d23b9e commit f80bb1c
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 27 deletions.
7 changes: 1 addition & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
</parent>

<!--
This is the Kritek fork of Troilus .17-SNAPSHOT
See changes.txt for what was added to Kritek fork.
NOTE: To build in Eclipse IDE, just delete this Problems 'Marker', whenever it shows up:
Description Resource Path Location Type
Expand All @@ -21,11 +18,10 @@
-->
<groupId>net.oneandone.troilus</groupId>
<artifactId>troilus-parent</artifactId>
<version>0.17-RELEASE</version>
<version>0.17-SNAPSHOT</version>
<packaging>pom</packaging>

<properties>
<!-- later versions -->
<surefire.version>2.15</surefire.version>
<reactivestreams.version>1.0.0</reactivestreams.version>
<cassandra.driver.core.version>3.0.0-rc1</cassandra.driver.core.version>
Expand Down Expand Up @@ -104,7 +100,6 @@
<!-- Set this to "true" to redirect the unit test standard output to a file
(found in reportsDirectory/testName-output.txt). -->
<threadCount>1</threadCount>

</configuration>
</plugin>
</plugins>
Expand Down
7 changes: 2 additions & 5 deletions troilus-core-java7/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>net.oneandone.troilus</groupId>
<artifactId>troilus-parent</artifactId>
<version>0.17-RELEASE</version>
<version>0.17-SNAPSHOT</version>
</parent>
<artifactId>troilus-core-java7</artifactId>
<packaging>jar</packaging>
Expand All @@ -14,8 +14,6 @@

</dependencies>



<build>
<plugins>
<plugin>
Expand All @@ -29,5 +27,4 @@
</plugin>
</plugins>
</build>
</project>

</project>
7 changes: 3 additions & 4 deletions troilus-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>net.oneandone.troilus</groupId>
<artifactId>troilus-parent</artifactId>
<version>0.17-RELEASE</version>
<version>0.17-SNAPSHOT</version>
</parent>
<artifactId>troilus-core</artifactId>
<packaging>jar</packaging>
Expand All @@ -14,7 +14,7 @@
<dependency>
<groupId>net.oneandone.troilus</groupId>
<artifactId>troilus-core-java7</artifactId>
<version>0.17-RELEASE</version>
<version>0.17-SNAPSHOT</version>
</dependency>


Expand Down Expand Up @@ -80,5 +80,4 @@

</plugins>
</build>
</project>

</project>
14 changes: 7 additions & 7 deletions troilus-core/src/main/java/net/oneandone/troilus/DaoImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -321,15 +321,15 @@ public ListReadWithUnit<ResultList<Record>, Record> readSequenceWithKeys(String

@Override
public ListReadWithUnit<ResultList<Record>, Record> readSequenceWithKeys(String composedKeyNamePart1, Object composedKeyValuePart1,
String composedKeyNamePart2, ImmutableList<Object> composedKeyValuesPart2) {
String composedKeyNamePart2, ImmutableList<Object> composedKeyValuesPart2) {
return new ListReadQueryAdapter(ctx, new ListReadQuery(ctx, new ReadQueryDataImpl(tablename).keys(ImmutableMap.of(composedKeyNamePart1, ImmutableList.of(composedKeyValuePart1),
composedKeyNamePart2, composedKeyValuesPart2))));
}

@Override
public ListReadWithUnit<ResultList<Record>, Record> readSequenceWithKeys(String composedKeyNamePart1, Object composedKeyValuePart1,
String composedKeyNamePart2, Object composedKeyValuePart2,
String composedKeyNamePart3, ImmutableList<Object> composedKeyValuesPart3) {
String composedKeyNamePart2, Object composedKeyValuePart2,
String composedKeyNamePart3, ImmutableList<Object> composedKeyValuesPart3) {
return new ListReadQueryAdapter(ctx, new ListReadQuery(ctx, new ReadQueryDataImpl(tablename).keys(ImmutableMap.of(composedKeyNamePart1, ImmutableList.of(composedKeyValuePart1),
composedKeyNamePart2, ImmutableList.of(composedKeyValuePart2),
composedKeyNamePart3, composedKeyValuesPart3))));
Expand All @@ -342,7 +342,7 @@ public ListReadWithUnit<ResultList<Record>, Record> readSequenceWithKey(String c

@Override
public ListReadWithUnit<ResultList<Record>, Record> readSequenceWithKey(String composedKeyNamePart1, Object composedKeyValuePart1,
String composedKeyNamePart2, Object composedKeyValuePart2) {
String composedKeyNamePart2, Object composedKeyValuePart2) {
return new ListReadQueryAdapter(ctx, new ListReadQuery(ctx, new ReadQueryDataImpl(tablename).keys(ImmutableMap.of(composedKeyNamePart1, ImmutableList.of(composedKeyValuePart1),
composedKeyNamePart2, ImmutableList.of(composedKeyValuePart2)))));
}
Expand All @@ -364,8 +364,8 @@ public <T, E> ListReadWithUnit<ResultList<Record>, Record> readSequenceWithKeys(
@SuppressWarnings("unchecked")
@Override
public <T, E, F> ListReadWithUnit<ResultList<Record>, Record> readSequenceWithKeys(ColumnName<T> composedKeyNamePart1, T composedKeyValuePart1,
ColumnName<E> composedKeyNamePart2, E composedKeyValuePart2,
ColumnName<F> composedKeyNamePart3, ImmutableList<F> composedKeyValuesPart3) {
ColumnName<E> composedKeyNamePart2, E composedKeyValuePart2,
ColumnName<F> composedKeyNamePart3, ImmutableList<F> composedKeyValuesPart3) {
return readSequenceWithKeys(composedKeyNamePart1.getName(), (Object) composedKeyValuePart1,
composedKeyNamePart2.getName(), (Object) composedKeyValuePart2,
composedKeyNamePart3.getName(), (ImmutableList<Object>) composedKeyValuesPart3);
Expand All @@ -378,7 +378,7 @@ public <T> ListReadWithUnit<ResultList<Record>, Record> readSequenceWithKey(Colu

@Override
public <T, E> ListReadWithUnit<ResultList<Record>, Record> readSequenceWithKey(ColumnName<T> composedKeyNamePart1, T composedKeyValuePart1,
ColumnName<E> composedKeyNamePart2, E composedKeyValuePart2) {
ColumnName<E> composedKeyNamePart2, E composedKeyValuePart2) {
return readSequenceWithKey(composedKeyNamePart1.getName(), (Object) composedKeyValuePart1,
composedKeyNamePart2.getName(), (Object) composedKeyValuePart2);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import com.datastax.driver.core.Session;
import com.google.common.base.Charsets;
import com.google.common.base.Splitter;
import com.google.common.base.Strings;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
Expand All @@ -49,7 +50,6 @@
* @author Jason Westra - edited original
*/
public class CassandraDB {

private static final String CASSANDRA_YAML_FILE = "cassandra.yaml";

private static CassandraDaemon cassandraDaemon;
Expand Down Expand Up @@ -183,15 +183,15 @@ public void executeCql(String cql) {
public void tryExecuteCql(String cql) {
try {
session.execute(cql);
} catch (RuntimeException e) {
e.printStackTrace();
}
} catch (RuntimeException ignore) { }
}


public void tryExecuteCqls(Iterable<String> cqls) {
for (String cql : cqls) {
tryExecuteCql(cql);
if (!Strings.isNullOrEmpty(cql)) {
tryExecuteCql(cql);
}
}
}

Expand Down
18 changes: 18 additions & 0 deletions troilus-core/src/test/resources/logback-test.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<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>
</appender>

<root level="WARN">
<appender-ref ref="STDOUT" />
</root>


<logger name="net.oneandone.troilus" level="debug" additivity="false">
<appender-ref ref="STDOUT" />
</logger>
</configuration>

0 comments on commit f80bb1c

Please sign in to comment.