<div dir="ltr">Thank you Jean-Paul<div><br></div><div>It works ok using the <span style="font-size:13px;font-family:arial,sans-serif">PythonLogg</span><span style="font-size:13px;font-family:arial,sans-serif">ingObserver</span></div>

<div><span style="font-size:13px;font-family:arial,sans-serif"><br></span></div><div><span style="font-size:13px;font-family:arial,sans-serif">Regards</span></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">

2014-04-30 13:55 GMT+02:00  <span dir="ltr"><<a href="mailto:exarkun@twistedmatrix.com" target="_blank">exarkun@twistedmatrix.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="">On 08:57 am, <a href="mailto:juanito1982@gmail.com" target="_blank">juanito1982@gmail.com</a> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
<br>
 I am trying to modify loglevel withou result. I configure my app logging<br>
inside the tac file as:<br>
</blockquote>
<br></div>
You omitted the imports necessary to interpret the example code with certainty but I'll make some guesses.  Next time post a complete, self- contained example.<br>
<br>
This line:<div class=""><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
logging.basicConfig(level=<u></u>logging.ERROR, format="%(asctime)s --- %(name)s -<br>
%(levelname)s - %(message)s")<br>
</blockquote>
<br></div>
configures the standard library logging module.<br>
<br>
This line:<div class=""><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
logfile = DailyLogFile("gdumper.log", "/var/log")<br>
</blockquote>
<br></div>
creates a log writer from the Twisted logging system that will write to a file.<br>
<br>
And this line:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
application.setComponent(<u></u>ILogObserver, FileLogObserver(logfile).emit)<br>
</blockquote>
<br>
makes `twistd` configure Twisted's logging system with a log observer that will use that log writer to record log events.<br>
<br>
Twisted's logging system and the standard library logging system are separate things, though.  Configuring the standard library logging system will not make any difference to Twisted's logging system.<br>
<br>
If you want log messages emitted by `log.msg` and `log.err` to traverse the standard library logging system then the minimum you need to do is use `twisted.python.log.<u></u>PythonLoggingObserver` instead of `FileLogObserver`.<br>


<br>
`PythonLoggingObserver` observes log events in the Twisted logging system and sends them to the standard library logging system.<br>
<br>
Once you do that you may be able to configure the standard library logging system to behave as you desire.<br>
<br>
Jean-Paul<div class=""><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
logging.basicConfig call seems do not apply as I get both log.msg and<br>
log.err messages into the log. Is there any other way to set up log level?<br>
<br>
Regards<br>
</blockquote>
<br></div>
______________________________<u></u>_________________<br>
Twisted-Python mailing list<br>
<a href="mailto:Twisted-Python@twistedmatrix.com" target="_blank">Twisted-Python@twistedmatrix.<u></u>com</a><br>
<a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python" target="_blank">http://twistedmatrix.com/cgi-<u></u>bin/mailman/listinfo/twisted-<u></u>python</a><br>
</blockquote></div><br></div>