How to proxy all methods from a Python module to another?
<p>I want to have in my application a common logging module that logs to a file. 
For example in my commonlog.py I can have something like this:</p>

<pre><code># Python logging module
import logging                                                   

logging.basicConfig(filename="test.log", level=logging.DEBUG) 
</code></pre>

<p>From the other modules in the application I want to import this module and be able to use it like if it was the Python logging module but without replicating all its functions, for example from module test.py:</p>

<pre><code>import commonlog

commonlog.debug("debug message")
commonlog.info("info message")
commonlog.ANY_OTHER_METHOD_THAT_BELONGS_TO_LOGGING()
</code></pre>

<p><strong>How can I "proxy" in my commonlog all the methods from the logging module ?</strong></p>

<p>Doing:</p>

<pre><code>commonlogging.logging.etc..
</code></pre>

<p>is not a valid solution because it's using the logging module directly.</p>
