Skip to content

Commit

Permalink
#328 Add Lombok and improve logging
Browse files Browse the repository at this point in the history
  • Loading branch information
dvoraka committed Jul 9, 2019
1 parent 8156148 commit eec9416
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,10 @@ allprojects {
// H2 DB
runtime('com.h2database:h2')

// Lombok
compileOnly('org.projectlombok:lombok')
annotationProcessor('org.projectlombok:lombok')

//
// Testing
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@

import dvoraka.avservice.common.data.replication.ReplicationMessage;
import dvoraka.avservice.common.listener.MessageListener;
import lombok.extern.slf4j.Slf4j;

import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CopyOnWriteArraySet;


@Slf4j
public class DefaultSimpleBroker implements SimpleBroker<ReplicationMessage> {

private final Map<String, Set<MessageListener<ReplicationMessage>>> queueMap;
Expand All @@ -20,6 +22,7 @@ public DefaultSimpleBroker() {

@Override
public void send(String queueName, ReplicationMessage message) {
log.debug("Send ({}): {}", queueName, message);

if (queueMap.get(queueName) != null) {
Set<MessageListener<ReplicationMessage>> listeners = queueMap.get(queueName);
Expand Down
4 changes: 2 additions & 2 deletions common/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
<encoder class="net.logstash.logback.encoder.LogstashEncoder"/>
</appender>

<logger name="dvoraka.avservice" level="WARN" additivity="false">
<logger name="dvoraka.avservice" level="DEBUG" additivity="false">
<appender-ref ref="TCP"/>
<!--<appender-ref ref="STDOUT"/>-->
<appender-ref ref="STDOUT"/>
</logger>

<logger name="org.springframework" level="WARN" additivity="false">
Expand Down

0 comments on commit eec9416

Please sign in to comment.