I am wondering if there a any examples of using logging in bfg out
there ?

I have about the simplest bfg web app possible (can certainly give
more details if necessary) and have so far done some debugging by
print, i. e.

* I call print 'blah' in views.py, models.py once in a while

* I can see the output in paster.log

but would like to replace this with something like

  import logging

or a little bit fancier (in run.py):

  import logging
  logger = logging.getLogger("mylogger")
  h = logging.StreamHandler()
  formatter = ...

then in views.py

  logger = logging.getLogger("mylogger")

but can't see the output in my paster.log, any advice ?
do I have to set up a wsgi pipeline just for the logging ?

Alternatively I tried to configure this in the (paster) 
website.ini file of my app

  use = egg:website#app
  reload_templates = true

  log_stream = sys.stdout
  log_level = logging.DEBUG

(I run my app with ./bin/paster serve ./website.ini)
- no success either: can't see any logging output

Any advice / docs / examples ?

Repoze-dev mailing list

Reply via email to