Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
reinhapa committed Oct 21, 2017
1 parent 88cb723 commit e097cd8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ asciidoctorj {
}

dependencies {
implementation "slf4j:slf4j-api:1.7.25"
implementation "org.slf4j:slf4j-api:1.7.25"
implementation "javax.enterprise:cdi-api:1.2"
testImplementation "junit:junit:4.12"
testImplementation "org.hamcrest:hamcrest-core:1.3"
Expand Down
10 changes: 9 additions & 1 deletion src/main/java/org/slf4j/cdi/LoggerProducer.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
package org.slf4j.cdi;

import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.inject.Produces;
import javax.enterprise.inject.spi.InjectionPoint;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@ApplicationScoped
public class LoggerProducer {

@Produces
public static Logger createLogger(InjectionPoint ip) {
return LoggerFactory.getLogger(ip.getBean().getBeanClass());
}
}

0 comments on commit e097cd8

Please sign in to comment.