Skip to content

Instantly share code, notes, and snippets.

15:11:50,580 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
15:11:50,580 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
15:11:50,580 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [file:/redmart/code/payment-service/target/universal/stage/conf/logback.xml]
15:11:50,658 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
15:11:50,659 |-INFO in ch.qos.logback.core.joran.action.ConversionRuleAction - registering conversion word requestId with class [logging.RequestConverter]
15:11:50,804 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
15:11:50,806 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT]
15:11:50,847 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of ty
@AlejandroRivera
AlejandroRivera / EmbeddedMessageQueueResource.java
Created October 7, 2016 15:47
Apache QPid as embedded MQ broker
package com.redmart.commons.test.mq;
import com.google.common.base.Charsets;
import com.google.common.collect.ImmutableMap;
import com.google.common.io.Resources;
import ch.qos.logback.classic.LoggerContext;
import ch.qos.logback.classic.util.ContextInitializer;
import ch.qos.logback.core.joran.spi.JoranException;
import com.fasterxml.jackson.databind.ObjectMapper;
@AlejandroRivera
AlejandroRivera / DistributedTracingMongoSubscriber.java
Created November 18, 2016 15:53
MongoDB Zipkin/Brave integration
package com.example.tracing.db.mongo;
import com.example.tracing.MongoDbConstants;
import com.github.kristofa.brave.Brave;
import com.github.kristofa.brave.LocalTracer;
import com.google.inject.Inject;
import com.google.inject.Singleton;
import com.mongodb.MongoQueryEventSubscriber;
import com.mongodb.ReadPreference;
@AlejandroRivera
AlejandroRivera / MyWsClient.java
Last active January 30, 2018 11:30
Using Play's MVC RequestHeader info in a WS Client filter
import javax.inject.{Inject, Singleton}
import play.api.libs.ws.{WSClient, WSRequest, WSRequestFilter}
@Singleton
class MyWsClient @Inject()(wsClient: WSClient,
filters: java.util.Set[WSRequestFilter] ) extends WSClient {
override def underlying[T]: T = wsClient.asInstanceOf[T]
[playlist]
File1=http://soundbible.com/grab.php?id=1377&type=mp3
NumberOfEntries=1
Version=2