Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Python
redirecting stdout/err to mysql table
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Aleksandar Radulovic, post: 3680566"] First of all, your code is not quite pythonic and it will also open the connection to the database *every* time you log. That can be quite expensive and generally is not advisable. Plus it may block your code. I suggest checking out (already existing) logging module in Python distribution and extend the BaseHandler to implement the logging to a database. I highly recommend implementing pooling of connections to the DB (ie. by simply using SqlAlchemy instead of direct MySQLDb module). [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Python
redirecting stdout/err to mysql table
Top