Skip to content

Commit

Permalink
1.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
whitesock committed May 8, 2014
1 parent c23d275 commit 8f94089
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 5 deletions.
1 change: 1 addition & 0 deletions .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="src/test/resources"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public int readInt(int length, boolean littleEndian) throws IOException {
public long readLong(int length, boolean littleEndian) throws IOException {
long r = 0;
for(int i = 0; i < length; ++i) {
final int v = this.read();
final long v = this.read();
if(littleEndian) {
r |= (v << (i << 3));
} else {
Expand Down
5 changes: 1 addition & 4 deletions src/test/java/com/google/code/or/OpenReplicatorTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

import com.google.code.or.binlog.BinlogEventListener;
import com.google.code.or.binlog.BinlogEventV4;
import com.google.code.or.binlog.impl.event.XidEvent;

public class OpenReplicatorTest {
//
Expand All @@ -30,9 +29,7 @@ public static void main(String args[]) throws Exception {
or.setBinlogFileName("mysql-bin.000001");
or.setBinlogEventListener(new BinlogEventListener() {
public void onEvents(BinlogEventV4 event) {
if(event instanceof XidEvent) {
LOGGER.info("{}", event);
}
LOGGER.info("{}", event);
}
});
or.start();
Expand Down
25 changes: 25 additions & 0 deletions src/test/resources/logback.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<configuration>

<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{yy-MM-dd HH:mm:ss.SSS} %-5level[%thread %logger{0}.%M:%L]%marker %msg%n</pattern>
<outputPatternAsHeader>true</outputPatternAsHeader>
<immediateFlush>true</immediateFlush>
</encoder>
</appender>

<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${APP_HOME}/log/${APP_NAME}.%d{yyyy-MM-dd}.log</fileNamePattern>
</rollingPolicy>
<encoder>
<pattern>%d{yy-MM-dd HH:mm:ss.SSS} %-5level[%thread %logger{0}.%M:%L]%marker %msg%n</pattern>
<outputPatternAsHeader>true</outputPatternAsHeader>
<immediateFlush>true</immediateFlush>
</encoder>
</appender>

<root level="INFO">
<appender-ref ref="FILE" />
</root>
</configuration>

0 comments on commit 8f94089

Please sign in to comment.