The Logger is a special case because it knows the injection point of the injected member. It's
the only binding that does this.
191707
private static void bindLogger(InjectorImpl injector) {
    Key<Logger> key = Key.get(Logger.class);
    LoggerFactory loggerFactory = new LoggerFactory();
    injector.state.putBinding(
        key,
        new ProviderInstanceBindingImpl<Logger>(
            injector,
            key,
            SourceProvider.UNKNOWN_SOURCE,
            loggerFactory,
            Scoping.UNSCOPED,
            loggerFactory,
            ImmutableSet.<InjectionPoint>of()));

    try {
      Key<org.slf4j.Logger> slf4jKey = Key.get(org.slf4j.Logger.class);
      SLF4JLoggerFactory slf4jLoggerFactory = new SLF4JLoggerFactory(injector);
      injector.state.putBinding(slf4jKey,
          new ProviderInstanceBindingImpl<org.slf4j.Logger>(injector, slf4jKey,
              SourceProvider.UNKNOWN_SOURCE, slf4jLoggerFactory, Scoping.UNSCOPED,
              slf4jLoggerFactory, ImmutableSet.<InjectionPoint>of()));
    } catch (Throwable e) {}
  }
413820
public static synchronized boolean addLogger(@NonNull JobLogger logger) {
        for (JobLogger printer1 : loggers) {
            if (logger.equals(printer1)) {
                return false;
            }
        }

        for (int i = 0; i < loggers.length; i++) {
            if (loggers[i] == null) {
                loggers[i] = logger;
                return true;
            }
        }

        int index = loggers.length;
        loggers = Arrays.copyOf(loggers, loggers.length + 2);
        loggers[index] = logger;
        return true;
    }
1342791
public static List<ILoggingEvent> capture(Logger logger) {
        CaptureAppender capture = new CaptureAppender();
        ((ch.qos.logback.classic.Logger) logger).addAppender(capture);
        capture.start();
        return capture.captured;
    }
17725
static InternalLogger wrapLogger(Logger logger) {
        return logger instanceof LocationAwareLogger ?
                new LocationAwareSlf4JLogger((LocationAwareLogger) logger) : new Slf4JLogger(logger);
    }
893431
function LoggerContext() {
    LifeCycle.call(this);

    /**
     * Context start time
     */
    this.startTime = new Date();

    /**
     * The list of trace levels that the logger context knows about
     */
    this.logLevel = new LogLevel();

    /**
     * Root logger, final ancestor of all loggers
     */
    this.rootLogger = new Logger('[root]', this);

    /**
     * List of loggers that have been created, indexed by name.
     */
    this.loggers = {};

    /**
     * List of appenders that have been registered through a call to
     * "registerAppender", indexed by name.
     */
    this.appenders = {};

    /**
     * List of filters that have been registered through a call to
     * "registerFilter", indexed by name.
     */
    this.filters = {};

    /**
     * List of layouts that have been registered through a call to
     * "registerLayout", indexed by name.
     */
    this.layouts = {};

    /**
     * List of appenders that have been instantiated.
     *
     * The list is constructed when the configuration is applied. It is used
     * to start/stop appenders when corresponding functions are called on this
     * context.
     */
    this.createdAppenders = [];

    /**
     * The context-wide filter.
     *
     * The filter is constructed when the configuration is applied. If the
     * configuration specifies more than one context-wide filter, a
     * CompositeFilter filter is created.
     */
    this.filter = null;

    /**
     * Flag set when the context is up and running
     */
    this.started = false;

    /**
     * Log events received by the context before it got a chance to start and
     * that need to be processed as soon as the context is operational
     *
     * The context keeps a maximum of 1000 events in memory. If more events are
     * received before the context becomes operational, the context starts to
     * drop events, replacing the first event with a warning that events had to
     * be droppes. That warning is sent to the root logger.
     */
    this.pendingEvents = [];

    /**
     * Maximum number of log events that can be stored in the pending list.
     *
     * TODO: adjust this setting based on configuration settings.
     */
    this.maxPendingEvents = 1000;

    /**
     * Number of log events that had to be discarded so far
     */
    this.discardedPendingEvents = 0;
  }
61248
private void updateInjectionBinding(String jndiName, InjectionBinding<A> injectionBinding) // d675172
    {
        // If the annotation didn't have a name or the binding implementation
        // constructor did not set it, then the binding needs to be updated
        // with the default name or name (if not set by constructor).   // d682415
        if (!jndiName.equals(injectionBinding.getJndiName())) // d675172.1
        {
            injectionBinding.setJndiName(jndiName);
        }
    }
1363289
@Override
    public InjectionBinding<JMSDestinationDefinition> createInjectionBinding(JMSDestinationDefinition annotation, Class<?> instanceClass, Member member, String jndiName) throws InjectionException {
        InjectionBinding<JMSDestinationDefinition> injectionBinding =
                        new JMSDestinationDefinitionInjectionBinding(jndiName, ivNameSpaceConfig);
        injectionBinding.merge(annotation, instanceClass, null);
        return injectionBinding;
    }
1195672
@SuppressWarnings( { "NestedTryStatement" })
    public void init_logger() {
	try {
	    Util.out4.println("Initializing logging for " + get_name());
	    // - Get Util instance
	    final Util util = Util.instance();
	    // - Get cmd line logging level then ...
	    final int trace_level = util.get_trace_level();
	    // ... convert it to log4j level
	    Level cmd_line_level;
	    // does the logging level set from cmd line?
	    boolean level_set_from_cmd_line = true;
	    if (trace_level <= 0) {
		level_set_from_cmd_line = false;
		cmd_line_level = Level.OFF;
	    } else if (trace_level <= 2) {
		cmd_line_level = Level.INFO;
	    } else {
		cmd_line_level = Level.DEBUG;
	    }
	    // - Add a console target if logging level set from cmd line
	    if (level_set_from_cmd_line) {
		// add a console target if logging level set from cmd line
		try {
		    Logging.instance().add_logging_target(get_logger(), LOGGING_CONSOLE_TARGET);
		} catch (final DevFailed df) {
		    /** ignore exception */
		}
	    }
	    if (!Util._UseDb) {
		// - Done if we are not using the database
		Util.out4.println("Not using the database. Logging Intialization complete");
		return;
	    }
	    // - Get both logging level and targets from database
	    final Logging.LoggingProperties properties = Logging.instance().get_logging_properties(
		    get_logger(), util.get_database());
	    if (properties == null) {
		Util.out4.println("Failed to obtain logging properties from database");
		Util.out4.println("Aborting logging intialization");
		get_logger().setLevel(cmd_line_level);
		return;
	    }
	    // - Set logging level
	    if (level_set_from_cmd_line == false) {
		get_logger().setLevel(properties.logging_level);
		Util.out4.println("Logging level set to " + properties.logging_level.toString());
	    } else {
		get_logger().setLevel(cmd_line_level);
	    }
	    // - Save current logging level
	    last_level = get_logger().getLevel();
	    // - Get rolling threshold for file targets
	    if (rft != properties.logging_rft) {
		rft = properties.logging_rft;
		Util.out4.println("Rolling threshold changed to " + String.valueOf(rft));
	    }
	    // - Set logging targets
	    if (properties.logging_targets != null) {
		Util.out4.println("Adding logging targets (" + properties.logging_targets.length
			+ " entries in db)");
		for (final String logging_target : properties.logging_targets) {
		    try {
			Logging.instance().add_logging_target(get_logger(), logging_target);
		    } catch (final DevFailed e) { /* ignore any exception */
		    }
		}
	    }
	    // set rolling file threshold for file targets
	    Logging.instance().set_rolling_file_threshold(get_logger(), rft);
	} catch (final Exception e) {
	    // igore any exception
	}
    }
406063
private boolean findBinding(Injector injector, Class<?> type) {
        boolean found = false;
        for (Key<?> key : injector.getBindings().keySet()) {
            if (key.getTypeLiteral().getRawType().equals(type)) {
                found = true;
                break;
            }
        }
        if (!found && injector.getParent() != null) {
            return findBinding(injector.getParent(), type);
        }

        return found;
    }
1048632
public static boolean hasInject(MemberLiteral<?, ?> member) {
    return member.isAnnotationPresent(Inject.class)
        || member.isAnnotationPresent(javax.inject.Inject.class);
  }
686001
private Logger internalGetLogger(String name) {
    assert name != null : "Name was null";
    Logger rv = instances.get(name);

    if (rv == null) {
      Logger newLogger = null;
      try {
        newLogger = getNewInstance(name);
      } catch (Exception e) {
        throw new RuntimeException("Problem getting logger", e);
      }
      Logger tmp = instances.putIfAbsent(name, newLogger);
      // Return either the new logger we've just made, or one that was
      // created while we were waiting
      rv = tmp == null ? newLogger : tmp;
    }

    return (rv);
  }
1131110
def expose(self, binder, interface, annotation=None):
        """"""
        private_module = self
        class Provider(object):
            def get(self):
                return private_module.private_injector.get_instance(
                        interface, annotation)

        self.original_binder.bind(interface, annotated_with=annotation,
                                  to_provider=Provider)
1173844
private void _inferCaller()
  {
    _needToInferCaller = false;
    // Get the stack trace.
    StackTraceElement stack[] = (new Throwable()).getStackTrace();
    // First, search back to a method in the Logger class.
    int i = 0;

    while (i < stack.length)
    {
      StackTraceElement frame = stack[i];
      String cname = frame.getClassName();
      if (cname.equals(_JDK_LOG_CLASS) ||
          cname.equals(_MYFACES_LOG_CLASS))
      {
          break;
      }

      i++;
    }

    // Now search for the first frame before the "Logger" class.
    while (i < stack.length)
    {
      StackTraceElement frame = stack[i];
      String cname = frame.getClassName();

      if (cname.equals(_JDK_LOG_CLASS) ||
          cname.equals(_MYFACES_LOG_CLASS))
      {
        i++;
        continue;
      }

      String mname = frame.getMethodName();
      if ("log".equals(mname) ||
          "_log".equals(mname))
      {
        i++;
        continue;
      }

      // We've found the relevant frame.
      setSourceClassName(cname);
      setSourceMethodName(mname);
      return;

    }

    // Forcibly set both to null, so the LogRecord superclass
    // doesn't try to detect them on its own
    setSourceClassName(null);
    setSourceMethodName(null);
  }
1303710
public static void ensureInjected(){ //TODO: do real injection (lazy loading)
		if(injected)
			return;
		Resources res = GWT.create(Resources.class);
		String source = res.chartJsSource().getText();
        ScriptElement scriptElement = Document.get().createScriptElement();
        scriptElement.setId("_chartjs");
        scriptElement.setInnerText(source);
        Document.get().getBody().appendChild(scriptElement);
		injected = true;
	}
310928
@Override
  public final API withInjectedLogSite(LogSite logSite) {
    // First call wins (since auto-injection will typically target the log() method at the end of
    // the chain and might not check for previous explicit injection).
    if (this.logSite == null) {
      this.logSite = checkNotNull(logSite, "log site");
    }
    return api();
  }
963978
public static ThreadBoundJschLogger getInstance(final PluginLogger logger, final int loggingLevel) {
        getInstance();
        instance.setThreadLogger(logger, loggingLevel);
        return instance;
    }
530914
protected Logger wrap(String name, org.slf4j.Logger implementation) {
		return new Slf4jLogger(name, implementation);
	}