Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Pyramid paste/logging/uwsgi problem...
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Vlad K.  
View profile  
 More options Jul 13 2012, 2:44 pm
From: "Vlad K." <v...@haronmedia.com>
Date: Fri, 13 Jul 2012 20:44:16 +0200
Local: Fri, Jul 13 2012 2:44 pm
Subject: Pyramid paste/logging/uwsgi problem...

I think this is getting old....

Please, how do I run a Pyramid 1.3 app, full with logging as specified
in the .ini file, under uWSGI.

Thanks.

--

.oO V Oo.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Roberto De Ioris  
View profile  
 More options Jul 13 2012, 3:41 pm
From: "Roberto De Ioris" <robe...@unbit.it>
Date: Fri, 13 Jul 2012 21:41:13 +0200
Local: Fri, Jul 13 2012 3:41 pm
Subject: Re: Pyramid paste/logging/uwsgi problem...

> I think this is getting old....

> Please, how do I run a Pyramid 1.3 app, full with logging as specified
> in the .ini file, under uWSGI.

uwsgi --http :8080 --ini-paste-logged deployement.ini

(substitute deployment.ini with your config file).

You have to use at least uWSGI 1.2

--
Roberto De Ioris
http://unbit.it


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Vlad K.  
View profile  
 More options Jul 13 2012, 3:54 pm
From: "Vlad K." <v...@haronmedia.com>
Date: Fri, 13 Jul 2012 21:54:48 +0200
Local: Fri, Jul 13 2012 3:54 pm
Subject: Re: Pyramid paste/logging/uwsgi problem...
On 07/13/2012 09:41 PM, Roberto De Ioris wrote:

>> I think this is getting old....

>> Please, how do I run a Pyramid 1.3 app, full with logging as specified
>> in the .ini file, under uWSGI.

> uwsgi --http :8080 --ini-paste-logged deployement.ini

> (substitute deployment.ini with your config file).

> You have to use at least uWSGI 1.2

I must admit I didn't try directly from command line, but I use uwsgi
config INI because of vassals and several sites run under same uwsgi
server, so I like to drop them in /etc/uwsgi.d/ which I configured in my
custom sysvinit script.

So this is my config INI (not the paste INI):

[uwsgi]
master = true
processes = 1
enable-threads = true
single-interpreter = true
threads = 2
uid = siteuser
gid = siteuser
paste = config:/home/siteuser/Sitename/production.ini
chdir = /home/siteuser
virtualenv = /home/siteuser/Sitename/virtualenv
socket = /tmp/uwsgi/uwsgi-sitename.socket

So instead of "paste" I tried "ini-paste-logged" (assuming command line
parameters are equal to the INI params), and it doesn't work. I mean the
site works but the logging config is not picked up.

Meanwhile I found a way on another thread on the list. Basically, add
custom entry in production.ini, say "logging.config" (or whatever), and
then in the __init__'s main:

logging.config.fileConfig(settings["logging.config"])  # or whatever the
entry in .ini is

This works for now, but I don't think it's very elegant. I was looking
for a way to get the INI path in main() without having to resort to
settings tricks, but either I missed it in the docs, or there is no way.
Methinks whatever pserve is doing should be exposed (if it isn't already
and I missed it) to main().

Thanks.

--

.oO V Oo.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Roberto De Ioris  
View profile  
 More options Jul 14 2012, 1:43 am
From: "Roberto De Ioris" <robe...@unbit.it>
Date: Sat, 14 Jul 2012 07:43:32 +0200
Local: Sat, Jul 14 2012 1:43 am
Subject: Re: Pyramid paste/logging/uwsgi problem...

ini-paste-logged does not work in 'vassal' mode.

Use --paste-logger

paste = config:/home/siteuser/Sitename/production.ini
paste-logger = /home/siteuser/Sitename/production.ini

or better:

mypaste = /home/siteuser/Sitename/production.ini
paste = config:%(mypaste)
paste-logger = %(mypaste)

--
Roberto De Ioris
http://unbit.it


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »