Skip to content

Instantly share code, notes, and snippets.

If you ask an object for two bits of data, can you replace this with a single request for the bit of data you're calculating? If you tell an object to do two things, can you replace them with a single command?
@jscamara
jscamara / Dependency Tree
Created June 10, 2014 12:20
Dependency Tree do Projeto com Vraptor4 e Vraptor-i18n
[INFO] br.com.cakeshop:cakeshop:war:1.0-SNAPSHOT
[INFO] +- org.apache.logging.log4j:log4j-core:jar:2.0-rc1:compile
[INFO] | \- org.apache.logging.log4j:log4j-api:jar:2.0-rc1:compile
[INFO] +- br.com.caelum:vraptor:jar:4.0.0.Final:compile
[INFO] | +- com.google.guava:guava:jar:15.0:compile
[INFO] | +- br.com.caelum:iogi:jar:1.0.0:compile
[INFO] | +- org.javassist:javassist:jar:3.18.1-GA:compile
[INFO] | +- org.slf4j:slf4j-api:jar:1.7.5:compile
[INFO] | +- net.vidageek:mirror:jar:1.6.1:compile
[INFO] | +- com.thoughtworks.paranamer:paranamer:jar:2.6:compile
@jscamara
jscamara / CustomAppender.java
Last active December 17, 2015 20:09
Criação de arquivos de logs gerados dinamicamente a partir do processamento de threads; Usando log4j2
@Plugin(name="Custom", type="Core", elementType="appender", printObject=true)
public class CustomAppender extends AppenderBase{
protected CustomAppender(String name, Filter filter, Layout layout) {
super(name, filter, layout);
}
public CustomAppender(String name, Filter filter, Layout layout,
boolean handleExceptions) {
super(name, filter, layout, handleExceptions);