crwdns132579:0crwdne132579:0
crwdns132581:0crwdne132581:0
crwdns132583:0crwdne132583:0
crwdns132585:0crwdne132585:0
crwdns132587:0crwdne132587:0
crwdns132589:0crwdne132589:0
crwdns132591:0crwdne132591:0
crwdns132593:0crwdne132593:0
Note
crwdns132595:0:doc:crwdne132595:0
crwdns132597:0crwdne132597:0
import com.google.inject.Inject;
import org.slf4j.Logger;
@Inject
private Logger logger;
crwdns132599:0crwdne132599:0
private Logger logger;
@Inject
private void setLogger(Logger logger) {
this.logger = logger;
}
crwdns132601:0crwdne132601:0
// For the purpose of this example, "Banana" is the class name
private Logger logger;
@Inject
public Banana(Logger logger) {
this.logger = logger;
}
crwdns132603:0crwdne132603:0
crwdns132605:0crwdne132605:0
public Logger getLogger() {
return logger;
}
crwdns132607:0crwdne132607:0
crwdns132609:0crwdne132609:0
Note
crwdns132611:0crwdne132611:0
getLogger().info(String);
getLogger().debug(String);
getLogger().warn(String);
getLogger().error(String);
crwdns132613:0crwdne132613:0
getLogger().warn("This is a warning!");