On 26/09/2013 17:03, Roberto De Ioris wrote:
Hi there,

We're sending the uWSGI logs for a large number of vassals across a
cluster of web servers to an rsyslog instance that splits them up by
domain and logs them to appropriate files.  So that the rsyslog instance
can work out which domain a particular message relates to, we're adding
a prefix using logdate:

     logdate = www.thedomainname.com %%F %%T

This works perfectly, except when the domain name is very long. Looking
at the uWSGI code, it seems that there's a 64-character limit on the
prefix once the logdate strftime string has been expanded.

Is there a better way of doing this?  We've seen that there's also a
log-prefix config parameter, but it looks like this is just an alias for
logdate (and log-date).

If this is the right way to do it, could the 64-character limit be
increased?


All the best,

Giles

Log encoders are more powerful:

log-encoder = format xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
${strftime:%%d/%%m} ${msgnl}

http://uwsgi-docs.readthedocs.org/en/latest/LogEncoders.html

technically you could change the strftime buffer of logdate/logprefix but
it is not worthy as we already have advanced formatting

That sounds perfect, we'll give it a go.  Thanks!


Giles

--
Giles Thomas<[email protected]>

PythonAnywhere: Develop Python in your browser
<http://pythonanywhere.com/>

A product from PythonAnywhere LLP
17a Clerkenwell Road, London EC1M 5RD, UK
VAT No.: GB 893 5643 79
Registered in England and Wales as company number OC378414.
Registered address: 28 Ely Place, 3rd Floor, London EC1N 6TD, UK

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

Reply via email to