title: How do I define a different logger for an imported module in Python?
body: <p>I'm using <a href="http://pythonhosted.org/APScheduler/index.html#faq" rel="noreferrer">Advanced Python Scheduler</a> in a Python script.  The main program defines a log by calling logging.basicConfig with the file name of the log that I want.  This log is also set to "DEBUG" as the logging level, since that's what I need at present for my script.</p>
  
  <p>Unfortunately, because logging.basicConfig has been set up in this manner, apscheduler writes its log entries to the same log file.  There are an awful lot of these, especially since I have one scheduled task that runs every minute. </p>
  
  <p>Is there any way to redirect apscheduler's log output to another log file (without changing apscheduler's code) while using my log file for my own script?  I.e. is there a way to change the file name for each module's output within my script?</p>
  
  <p>I tried reading the <a href="http://docs.python.org/2/library/logging.html#logging.getLogger" rel="noreferrer">module page</a> and the HOWTO for logging, but could not find an answer to this.</p>