Python logging: Best way to organize logs in different files?
<p>I have different loggers (log1, log2, log3, ..., logN) which are being logged to "registry.log" for a big N. I would like to divide "registry.log" into N different files as "registry.log" can become really large.</p>

<p>Is there a way to accomplish this automatically, for instance, with a  rotating handler?</p>

<p>Create a <code>logging.Handler</code> subclass which determines which file to write to based on the details of the event being logged, and write the formatted event to that file.</p>

python logging rotation handler hierarchy