add: log messages woth python module 'logging' instead of print
This commit is contained in:
12
run.py
12
run.py
@@ -4,8 +4,18 @@ from app import app
|
||||
from os import urandom
|
||||
from app import gui
|
||||
import thread
|
||||
import logging
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
#logging!
|
||||
logfile = "baroness.log"
|
||||
#logging.basicConfig(filename=logfile, level=logging.WARNING)
|
||||
logging.basicConfig(level=logging.DEBUG)
|
||||
logging.info("Baroness started!")
|
||||
print "Baroness started: logging to ", logfile
|
||||
|
||||
|
||||
#start gui
|
||||
wx = wx.App()
|
||||
gui.MainWindow(None)
|
||||
@@ -13,6 +23,6 @@ if __name__ == '__main__':
|
||||
|
||||
# start flask
|
||||
app.secret_key = urandom(24)
|
||||
app.run(debug=True)
|
||||
app.run(host="0.0.0.0")
|
||||
|
||||
#app.run()
|
||||
|
||||
Reference in New Issue
Block a user