Python中Flask框架SQLALCHEMY_ECHO设置
2018-12-28 08:04:51来源:博客园 阅读 ()
在用配置类的方式给app设置配置时, SQLALCHEMY_ECHO 这个是记录打印SQL语句用于调试的, 一般设置为False, 不然会在控制台输出一大堆的东西
/home/python/.virtualenvs/py3_flask/bin/python /home/python/Desktop/test/demo_sqlalchemy.py
2018-12-27 17:46:54,205 INFO sqlalchemy.engine.base.Engine SHOW VARIABLES LIKE 'sql_mode'
2018-12-27 17:46:54,205 INFO sqlalchemy.engine.base.Engine {}
2018-12-27 17:46:54,208 INFO sqlalchemy.engine.base.Engine SHOW VARIABLES LIKE 'lower_case_table_names'
2018-12-27 17:46:54,208 INFO sqlalchemy.engine.base.Engine {}
2018-12-27 17:46:54,211 INFO sqlalchemy.engine.base.Engine SELECT DATABASE()
2018-12-27 17:46:54,211 INFO sqlalchemy.engine.base.Engine {}
2018-12-27 17:46:54,212 INFO sqlalchemy.engine.base.Engine show collation where `Charset` = 'utf8mb4' and `Collation` = 'utf8mb4_bin'
2018-12-27 17:46:54,212 INFO sqlalchemy.engine.base.Engine {}
2018-12-27 17:46:54,214 INFO sqlalchemy.engine.base.Engine SELECT CAST('test plain returns' AS CHAR(60)) AS anon_1
2018-12-27 17:46:54,214 INFO sqlalchemy.engine.base.Engine {}
2018-12-27 17:46:54,215 INFO sqlalchemy.engine.base.Engine SELECT CAST('test unicode returns' AS CHAR(60)) AS anon_1
2018-12-27 17:46:54,215 INFO sqlalchemy.engine.base.Engine {}
2018-12-27 17:46:54,216 INFO sqlalchemy.engine.base.Engine SELECT CAST('test collated returns' AS CHAR CHARACTER SET utf8mb4) COLLATE utf8mb4_bin AS anon_1
2018-12-27 17:46:54,216 INFO sqlalchemy.engine.base.Engine {}
2018-12-27 17:46:54,217 INFO sqlalchemy.engine.base.Engine DESCRIBE `user`
2018-12-27 17:46:54,217 INFO sqlalchemy.engine.base.Engine {}
2018-12-27 17:46:54,218 INFO sqlalchemy.engine.base.Engine DESCRIBE `role`
2018-12-27 17:46:54,218 INFO sqlalchemy.engine.base.Engine {}
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
* Restarting with stat
2018-12-27 17:46:54,661 INFO sqlalchemy.engine.base.Engine SHOW VARIABLES LIKE 'sql_mode'
2018-12-27 17:46:54,661 INFO sqlalchemy.engine.base.Engine {}
2018-12-27 17:46:54,663 INFO sqlalchemy.engine.base.Engine SHOW VARIABLES LIKE 'lower_case_table_names'
2018-12-27 17:46:54,663 INFO sqlalchemy.engine.base.Engine {}
2018-12-27 17:46:54,667 INFO sqlalchemy.engine.base.Engine SELECT DATABASE()
2018-12-27 17:46:54,667 INFO sqlalchemy.engine.base.Engine {}
2018-12-27 17:46:54,668 INFO sqlalchemy.engine.base.Engine show collation where `Charset` = 'utf8mb4' and `Collation` = 'utf8mb4_bin'
2018-12-27 17:46:54,668 INFO sqlalchemy.engine.base.Engine {}
2018-12-27 17:46:54,670 INFO sqlalchemy.engine.base.Engine SELECT CAST('test plain returns' AS CHAR(60)) AS anon_1
2018-12-27 17:46:54,670 INFO sqlalchemy.engine.base.Engine {}
2018-12-27 17:46:54,670 INFO sqlalchemy.engine.base.Engine SELECT CAST('test unicode returns' AS CHAR(60)) AS anon_1
2018-12-27 17:46:54,671 INFO sqlalchemy.engine.base.Engine {}
2018-12-27 17:46:54,671 INFO sqlalchemy.engine.base.Engine SELECT CAST('test collated returns' AS CHAR CHARACTER SET utf8mb4) COLLATE utf8mb4_bin AS anon_1
2018-12-27 17:46:54,671 INFO sqlalchemy.engine.base.Engine {}
2018-12-27 17:46:54,672 INFO sqlalchemy.engine.base.Engine DESCRIBE `user`
2018-12-27 17:46:54,672 INFO sqlalchemy.engine.base.Engine {}
2018-12-27 17:46:54,674 INFO sqlalchemy.engine.base.Engine DESCRIBE `role`
2018-12-27 17:46:54,674 INFO sqlalchemy.engine.base.Engine {}
* Debugger is active!
* Debugger PIN: 983-796-441
标签:
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有
- python3基础之“术语表(2)” 2019-08-13
- python3 之 字符串编码小结(Unicode、utf-8、gbk、gb2312等 2019-08-13
- Python3安装impala 2019-08-13
- 小白如何入门 Python 爬虫? 2019-08-13
- python_字符串方法 2019-08-13
IDC资讯: 主机资讯 注册资讯 托管资讯 vps资讯 网站建设
网站运营: 建站经验 策划盈利 搜索优化 网站推广 免费资源
网络编程: Asp.Net编程 Asp编程 Php编程 Xml编程 Access Mssql Mysql 其它
服务器技术: Web服务器 Ftp服务器 Mail服务器 Dns服务器 安全防护
软件技巧: 其它软件 Word Excel Powerpoint Ghost Vista QQ空间 QQ FlashGet 迅雷
网页制作: FrontPages Dreamweaver Javascript css photoshop fireworks Flash