I actually did come up with such a system for replacing Paste not long ago:
https://bitbucket.org/chrism/marco/src/tip/examples/sample.yaml It does work, but to be honest, I'm not sure I want to maintain such a thing. ;-) Maybe someone else could make something of it though... - C On Sat, 2010-11-06 at 04:11 -0700, Ghostwriter wrote: > > No plans, for YAML right now that I know of, no. > > Thanks for reply! > > > but Paste is a separate package from Pyramid so the changes would have to > > be made there. > Is it possible to implement this functionality leaving behind Paste* > packages? Maybe as an extension to pyramid? > > > Python logging can't parse a YAML file directly. > > There is a dictConfig (http://docs.python.org/library/ > logging.html#logging.dictConfig) configuration function in Python 2.7. > Though it's not a file-parser but it can be used for direct mapping of > logging configuration. For ex.: > > # Logging configuration > logging: > version: 1 > > # Root logger > root: > level: INFO > handlers: [console] > > loggers: > routes: > #level = DEBUG logs the route matched and routing variables. > level: INFO > qualname: routes.middleware > > frontserver: > level: INFO > qualname: frontserver > > sqlalchemy: > # INFO logs SQL queries. > # DEBUG logs SQL queries and results. > # WARN logs neither. (Recommended for production systems.) > level: INFO > qualname: sqlalchemy.engine > > handlers: > console: > class: logging.StreamHandler > stream: ext://sys.stderr > level: NOTSET > formatter: generic > > formatters: > generic: > format: "%(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] % > (message)s" > datefmt: "%H:%M:%S" > > On Nov 6, 8:55 am, Mike Orr <sluggos...@gmail.com> wrote: > > On Fri, Nov 5, 2010 at 9:18 PM, Chris McDonough <chr...@plope.com> wrote: > > > On Fri, 2010-11-05 at 14:51 -0700, Ghostwriter wrote: > > >> Hello! > > >> I have a question to core developers of pyramid. > > >> Did you planning to use (truly pythonic!) YAML-based configuration > > >> files instead of Paste's INI-configs? Since the Pylons2/pyramid isn't > > >> backward compatible with Pylons-1.x it would be nice to see YAML as a > > >> framework's default configuration format. > > > > >> *** And I feel very sorry for my English grammar. > > > > > No plans, for YAML right now that I know of, no. > > > > I think YAML was brought up earlier as a configuration format, but it > > hasn't been pursued. > > > > YAML might be a superior format for PasteDeploy, in which case it > > could replace the INI file, but Paste is a separate package from > > Pyramid so the changes would have to be made there. And of course, > > we'd have to define a YAML format and test it. Also, in the current > > system, the same INI file can contain both Paste settings and Python > > logging settings (and repoze.who settings, etc). Python logging can't > > parse a YAML file directly. > > > > -- > > Mike Orr <sluggos...@gmail.com> > -- You received this message because you are subscribed to the Google Groups "pylons-devel" group. To post to this group, send email to pylons-de...@googlegroups.com. To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en.