Okay, is uwsgi.env the right way to access the environment values?  I
just stumbled on it with a dir(uwsgi).

On Wed, Mar 11, 2015 at 11:46 AM, Roberto De Ioris <[email protected]> wrote:
>
>> When logging I'm using "%(threadName)s" in my formatting to output the
>> thread name.  This worked fine when using threads, but now that I'm
>> trying to use ugreen, every async core has the same process and thread
>> name.  Is there some sort of way to output which "async core" I'm on?
>>
>> I tried uwsgi.get_logvar('core') but it returns "None".
>>
>> I think I found it at uwsgi.env['uwsgi.core'] , but I'm not sure if
>> that's documented anywhere.  There's no mention of the "env"
>> dictionary at
>> http://uwsgi-docs.readthedocs.org/en/latest/PythonModule.html
>> .
>> _______________________________________________
>>
>
> As a 'core' has an opaque meaning (it only exists in the context of a
> request) the only way to correctly access it is accessing from the
> WSGI/Rack/PSGI environ. So yes, environ['uwsgi.core'] is the right value
>
>
> --
> Roberto De Ioris
> http://unbit.com
> _______________________________________________
> 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