From 17a7490cabfd4428cfdb5d9106dc076b1dc4b905 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sat, 4 Oct 2014 12:32:13 -0400 Subject: log4j: Test best practices. --- .../main/java/com/tavianator/sangria/log4j/Log4jLoggerProvider.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sangria-log4j/src/main') diff --git a/sangria-log4j/src/main/java/com/tavianator/sangria/log4j/Log4jLoggerProvider.java b/sangria-log4j/src/main/java/com/tavianator/sangria/log4j/Log4jLoggerProvider.java index dae2323..34262d7 100644 --- a/sangria-log4j/src/main/java/com/tavianator/sangria/log4j/Log4jLoggerProvider.java +++ b/sangria-log4j/src/main/java/com/tavianator/sangria/log4j/Log4jLoggerProvider.java @@ -19,6 +19,7 @@ package com.tavianator.sangria.log4j; import javax.inject.Singleton; +import com.google.inject.Inject; import com.google.inject.spi.InjectionPoint; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -34,6 +35,10 @@ import com.tavianator.sangria.contextual.ContextSensitiveProvider; */ @Singleton class Log4jLoggerProvider implements ContextSensitiveProvider { + @Inject + Log4jLoggerProvider() { + } + @Override public Logger getInContext(InjectionPoint injectionPoint) { return LogManager.getLogger(injectionPoint.getDeclaringType().getRawType()); -- cgit v1.2.3