title: Stackdriver Logging, Logback, and Logger Names
body: <p>I am logging to Logback and have configured a Stackdriver Logging appender as follows:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;appender name="CLOUD" class="com.google.cloud.logging.logback.LoggingAppender"&gt;
      &lt;log&gt;application.log&lt;/log&gt;
      &lt;resourceType&gt;generic_node&lt;/resourceType&gt;
      &lt;flushLevel&gt;INFO&lt;/flushLevel&gt;
  &lt;/appender&gt;
  </code></pre>
  
  <p>Log entries are showing up in the Stackdriver Logging console:</p>
  
  <pre><code>{
    insertId: "[...]"
    labels: {
      levelName: "INFO"
      levelValue: "20000"
    }
    logName: "[...]"
    receiveTimestamp: "2019-01-03T13:42:10.888423743Z"
    resource: {
      labels: {
        location: ""
        namespace: ""
        node_id: ""
        project_id: "[...]"
      }
      type: "generic_node"
    }
    severity: "INFO"
    textPayload: "client disconnected"
    timestamp: "2019-01-03T13:42:10.841Z"
  }
  </code></pre>
  
  <p>However, I am missing information about the logger a log message originated from. Specifically, suppose I log a message like this:</p>
  
  <pre class="lang-scala prettyprint-override"><code>import org.slf4j.LoggerFactory
  val log = LoggerFactory.getInstance("component-a")
  log.warn("temperature in hell fell below 100°C")
  </code></pre>
  
  <p>Then I would like to see that the log message came from the logger with the name "component-a". I found no mention of how to achieve this in the Stackdriver Logging documentation. I suppose I could configure a <code>LoggingEnhancer</code> to enhance every log entry with the name of the logger, but I have no information about this logger while enhancing log entries.</p>
  
  <p>Is there a (hopefully "canonical") solution to this?</p>