title: Akka- redirect log file between child actors
body: <p>I'm currently using log4j property <code>RollingFileAppender</code> to redirect the logs to a file, and the log file name is defined by a process argument:</p>
  
  <p>log4j.properties: </p>
  
  <pre><code>log4j.appender.file=org.apache.log4j.RollingFileAppender
  log4j.appender.file.File=-${filename}
  </code></pre>
  
  <p>Calling the process with args: <code>-Dfilename=childActor1</code> </p>
  
  <p>The actor is defined as: <code>class MyActor extends Actor with ActorLogging</code></p>
  
  <p>This works fine for remote actors, but now I want to create local child actors and redirect the log file to a file with the name of the actor. 
  I've read I can use <code>RoutingAppender</code> to switch logs between threads, but I'm not sure how is that integrated with Akka. </p>
  
  <p>I feel like there should be some kind of simple solution to do that but I can't find it, and the Akka documentation for logging is really poor.  </p>