gNeandr
2015-07-03 10:41:53 UTC
Have a problem with bottle and logging when I start the bottle part from
within another python program using a thread.
Step-by step description:
1. A python program (web.py) using bottle writes logs to a file with this
setup found on stackoverflow:
http://stackoverflow.com/questions/31080214/python-bottle-always-logs-to-console-no-logging-to-file?noredirect=1#comment50203469_31080214
2. My project works with a Raspberry's IO, for that I have a python program
(rpiControl.py). This handles all I/O and does the logging as described
with:
https://docs.python.org/3/howto/logging-cookbook.html#multiple-handlers-and-formatters
3. Because web.py is *only* a handler for UI/web-page I would like to start
it from within the 'rpiControl.py' using a thread like this:
tWeb = Thread(target=runWeb, args=(server, port)).start()
All works well with this setup ... but the logs previously written to the
log file are not seen anymore, not on the console, not in the file.
For sure there are some minor changes with web.py to get it running in
thread, but I oversee the point to get the logs with that setup.
Any suggestion?
--
within another python program using a thread.
Step-by step description:
1. A python program (web.py) using bottle writes logs to a file with this
setup found on stackoverflow:
http://stackoverflow.com/questions/31080214/python-bottle-always-logs-to-console-no-logging-to-file?noredirect=1#comment50203469_31080214
2. My project works with a Raspberry's IO, for that I have a python program
(rpiControl.py). This handles all I/O and does the logging as described
with:
https://docs.python.org/3/howto/logging-cookbook.html#multiple-handlers-and-formatters
3. Because web.py is *only* a handler for UI/web-page I would like to start
it from within the 'rpiControl.py' using a thread like this:
tWeb = Thread(target=runWeb, args=(server, port)).start()
All works well with this setup ... but the logs previously written to the
log file are not seen anymore, not on the console, not in the file.
For sure there are some minor changes with web.py to get it running in
thread, but I oversee the point to get the logs with that setup.
Any suggestion?
--
--
You are member of the "bottlepy" group at google groups.
See http://groups.google.de/group/bottlepy for mailing list options.
See http://bottlepy.org/ for news and documentation.
---
You received this message because you are subscribed to the Google Groups "bottlepy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bottlepy+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You are member of the "bottlepy" group at google groups.
See http://groups.google.de/group/bottlepy for mailing list options.
See http://bottlepy.org/ for news and documentation.
---
You received this message because you are subscribed to the Google Groups "bottlepy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bottlepy+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.