> I've encountered one particular difficulty with pshell and other Pyramid > scripts: Montague allows a config file to have more than one logging config, > which means I've combined development.ini and production.ini into a single > config.toml. pserve lets you specify which app and server to load (while > pshell does not, except with the PasteDeploy #app syntax), but none of the > scripts have a --logging-config argument. > > It seems to me that it would be good for the p*scripts to standardize on one > particular way to specify the app, server, and logging config to load from > the config files. Would anyone be opposed to a pull request making these > changes?
I also have sometimes wanted to separate the logging configuration from the rest of the file. The logging configuration is very verbose with multiple stanzas and many lines, and sometimes I have several files that differ in only one or two settings but the same logging configuration. I also have multiple developers with their own file in the version-control system, and often they all have the same logging or would like me to manage the default logging options. Whenever I change a default setting I have to replicate it in several files, and that includes logging changes. I also found that launching the application under uwsgi doesn't configure the logging automatically. That's done by Waitress or PasteDeploy Server or something like that, something that uwsgi bypasses. Uwsgi has a '--paste-logger' option that's supposed to configure a logging INI file, but it has never worked for me. So I've defined a 'logging' key in my application, and if it's not empty, the settings processor called by the main function calls FileConfig on the file named in the value. Under Uwsgi the value is just "%(__file__)s" or such, but this also allows me to use a different logging file under Waitress if I want to. -- You received this message because you are subscribed to the Google Groups "pylons-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-devel+unsubscr...@googlegroups.com. To post to this group, send email to pylons-devel@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-devel. For more options, visit https://groups.google.com/d/optout.