4-6 日志系统

 

(imooc) [root@localhost order]# python Hello.py 
 * Serving Flask app "Hello" (lazy loading)
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: on
 * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
 * Restarting with stat
Traceback (most recent call last):
  File "Hello.py", line 39, in <module>
    app.run(host='0.0.0.0', port=5000, debug=True)
  File "/root/imooc/lib/python3.5/site-packages/flask/app.py", line 944, in run
    run_simple(host, port, self, **options)
  File "/root/imooc/lib/python3.5/site-packages/werkzeug/serving.py", line 1007, in run_simple
    run_with_reloader(inner, extra_files, reloader_interval, reloader_type)
  File "/root/imooc/lib/python3.5/site-packages/werkzeug/_reloader.py", line 332, in run_with_reloader
    sys.exit(reloader.restart_with_reloader())
  File "/root/imooc/lib/python3.5/site-packages/werkzeug/_reloader.py", line 176, in restart_with_reloader
    exit_code = subprocess.call(args, env=new_environ, close_fds=False)
  File "/usr/local/python3/lib/python3.5/subprocess.py", line 560, in call
    with Popen(*popenargs, **kwargs) as p:
  File "/usr/local/python3/lib/python3.5/subprocess.py", line 950, in __init__
    restore_signals, start_new_session)
  File "/usr/local/python3/lib/python3.5/subprocess.py", line 1540, in _execute_child
    raise child_exception_type(errno_num, err_msg)
OSError: [Errno 8] Exec format error
(imooc) [root@localhost order]# pip uninstall werkzeug
Uninstalling Werkzeug-0.15.4:
  Would remove:
    /root/imooc/lib/python3.5/site-packages/Werkzeug-0.15.4.dist-info/*
    /root/imooc/lib/python3.5/site-packages/werkzeug/*
Proceed (y/n)? y
  Successfully uninstalled Werkzeug-0.15.4
(imooc) [root@localhost order]# pip install werkzeug==0.14.1
Collecting werkzeug==0.14.1
  Downloading https://files.pythonhosted.org/packages/20/c4/12e3e56473e52375aa29c4764e70d1b8f3efa6682bef8d0aae04fe335243/Werkzeug-0.14.1-py2.py3-none-any.whl (322kB)
     |████████████████████████████████| 327kB 25kB/s 
Installing collected packages: werkzeug
Successfully installed werkzeug-0.14.1
(imooc) [root@localhost order]# python Hello.py 
 * Serving Flask app "Hello" (lazy loading)
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: on
 * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
 * Restarting with stat
 * Debugger is active!
 * Debugger PIN: 130-122-435
[2019-06-08 11:43:53,370] ERROR in Hello: hello world, url:/api,url_1:/api,url_2:/css/bootstrap.css?ver=201906082300
[2019-06-08 11:43:53,370] INFO in Hello: hello world, url:/api,url_1:/api,url_2:/css/bootstrap.css?ver=201906082300
[2019-06-08 11:43:53,370] DEBUG in Hello: hello world, url:/api,url_1:/api,url_2:/css/bootstrap.css?ver=201906082300
192.168.1.102 - - [08/Jun/2019 11:43:53] "GET / HTTP/1.1" 200 -
 * Detected change in '/home/www/order/Hello.py', reloading
 * Restarting with stat
 * Debugger is active!
 * Debugger PIN: 130-122-435

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值