Skip to content

Commit 394830f

Browse files
committed
add flask-15-logging
1 parent 4a964ed commit 394830f

File tree

4 files changed

+20
-1
lines changed

4 files changed

+20
-1
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
flask

Flask-15-logging/manage.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
from flask import Flask, jsonify
2+
3+
app = Flask(__name__)
4+
5+
@app.route('/login', methods=['POST'])
6+
def login():
7+
app.logger.debug(f'login success.')
8+
return jsonify(
9+
{
10+
"code": 200
11+
}
12+
)
13+
14+
if __name__ == '__main__':
15+
app.run(debug=True, port=5000)

Flask-15-logging/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
flask

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,6 @@
1212
10. [表单处理](https://xugaoxiang.com/2020/07/09/flask-10-wtf/)
1313
11. [数据库操作flask-sqlalchemy](https://xugaoxiang.com/2020/07/14/flask-11-sqlalchemy/)
1414
12. [项目部署](https://xugaoxiang.com/2020/07/21/flask-12-deployment/)
15-
13. [常用项目结构](https://xugaoxiang.com/2020/08/19/flask-13-project-struture/)
15+
13. [常用项目结构](https://xugaoxiang.com/2020/08/19/flask-13-project-struture/)
16+
14. [蓝图](https://xugaoxiang.com/2020/08/24/flask-14-blueprint/)
17+
15. [日志](https://xugaoxiang.com/2020/08/25/flask-15-logging/)

0 commit comments

Comments
 (0)