On 03/28/2012 06:24 PM, Jeff Dyke wrote:
> I use SocketHandler across multiple apps, not just by my uwsgi servers
> and its handles the job perfectly, the added bene of all of my log files
> being on one file system.  And all the code you need to build your own
> is all online. I use this in conjunction with regular rotating file
> handlers that are located on the local system, should i need that
> flexibility.


So far I made two attempts.
Leightweight. Just log to the console and let uwsgi handle it.
----------------------------------------------------------------------

This works not too bad. however sometimes I'd like to separate uwsgi
logs and  python logs and this is a little tricky.

If I could convince uwsgi to write stderr / stdout to separate files,
then this could be good enough with following setup and wouldn't require
an additional extra logging process.

- python logging via stdout to one file
- wsgi logging via stderr to another one

What I didn't verify though is whether uwsgi would guarantee, that two
logs of two porcesses wouldn't be interleafed.
As long as each log line is complete this wouldn't matter. If logs could
be mixed, I'd have to abandon this approach in any case.


The log server approach
--------------------------

This seems to work and one of the advantages is, that I could log other
processes as well.
It just seems kind of a waste to have another process being active. I
also encountered occasionally pickling exceptions when running some test
code.
I still have to investigate the source of this issue.




> 
> On Wed, Mar 28, 2012 at 10:19 AM, Frank Jania
> <[email protected]
> <mailto:[email protected]>> wrote:
> 
>     You might check out http://pypi.python.org/pypi/ConcurrentLogHandler/
> 
> 
>     Frank JANIA
>     I solve problems.
> 
>     _______________________________________________
>     uWSGI mailing list
>     [email protected]
>     <mailto:[email protected]>
>     http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
> 
> 
> 
> 
> _______________________________________________
> uWSGI mailing list
> [email protected]
> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi


_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to