websauna / websauna

Websauna is a full stack Python web framework for building web services and back offices with admin interface and sign up process
https://websauna.org
Other
264 stars 55 forks source link

Better output for console scripts #24

Open miohtama opened 8 years ago

miohtama commented 8 years ago

ws-alembic etc. use a console logger instead of logger from INI file.

ncouture commented 8 years ago

Can you provide any additional details you think are essential to resolve this issue?

miohtama commented 8 years ago

[ ] create a setup_console_logging function in websauna.system.devop.cmdnline [ ] see guidelining example https://bitbucket.org/miohtama/cryptoassets/src/84ed4ff5e18c221ad0c13c73695cc34c9ff17ec4/cryptoassets/core/service/defaultlogging.py?at=master&fileviewer=file-view-default#defaultlogging.py-10 [ ] replace current setup_logging methods in console scripts with setup_console_logging [ ] make sure all tests pass [ ] open a github pull request

We still might need to honour logging ignores as given by INI files, I am trying to wrap around my head how to do this.

ncouture commented 8 years ago

I tried to remove all console loggers from development.ini but was unable to force one logger on all console scripts that way without making too many modifications.

Here's a small patch that provides better formatting for all console scripts: diff-b518bf58863f887889dedfc86b59611b73cb8347-setup_console_logging.txt

miohtama commented 8 years ago

Thanks. You can open a Github pull request to discuss about the patch, so I can add comments per each line. 1. Fork this repo 2. Push change into your own work 3. Press create Pull request button in Github UI.

It's ok to modify all console scripts. Heavy modifications are needed, because separate console logging system has not been in place before, but one is definitely needed.