title: Dropwizard logging: add new appender for a particular logger
body: <p>I'm new to dropwizard and am trying to figure out ways to configure logging better.</p>
  
  <p>I have registered a new logger in a bundle like so:        </p>
  
  <pre><code>Logger log = LoggerFactory.getLogger("mylogger");
  log.info("this is a log from mylogger");
  </code></pre>
  
  <p>Now I'm using this bundle in a bunch of services. By default any log that comes through this logger would be written to the application log file. </p>
  
  <p>The problem I'm trying to solve is this: I want all logs written by mylogger(only) to go to a new file. It is fairly starightforward to add a new appender to the service yml file like:</p>
  
  <pre><code>logging:
  
    loggers:
  
    appenders:
    - type: file.
      currentLogFilename: ./logs/example.log
      archivedLogFilenamePattern: ./logs/example-%d.log.gz
      archivedFileCount: 5
  </code></pre>
  
  <p>But this would mean that all of application logs would now be written to example.log. I do not know of a way to specify a logger specifically for this appender which does not affect/alter already existing logging.</p>
  
  <p>Can someone tell me if there's a way to do this in dropwizard? Thanks!</p>