> I've built a simple case to test:
>
> # test.py
> from flask import Flask
> import logging
>
> app = Flask(__name__)
>
> LOGGER = logging.getLogger('whatever')
> fh = logging.FileHandler('test.log', 'a'')
> LOGGER.addHandler(fh)
> LOGGER.setLevel(logging.DEBUG)
>
> @app.route('/')
> def hello():
>     LOGGER.info('hello log')
>     return 'Hello!'
>
> if __name__ == '__main__':
>     app.run()
>
> And then:
>
> $ uwsgi --socket 127.0.0.1:3031 --file /path/to/test.py --callable app
>
> And it's not working it doesn't write to the log file.
> What am I doing wrong?
>


I have tested your code and it works, does connecting with the browser
shows 'Hello!' (just to be sure the callable is running) ?



-- 
Roberto De Ioris
http://unbit.it
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to