Skip to content

Commit

Permalink
added two debugging messages
Browse files Browse the repository at this point in the history
'app port' and 'app running on {url}'
  • Loading branch information
DogukanUrker committed Jan 16, 2024
1 parent b1b1872 commit 9fec556
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
message("1", f"APP DEBUG MODE: {DEBUG_MODE}")
message("3", f"APP NAME: {APP_NAME}")
message("3", f"APP HOST: {APP_HOST}")
message("3", f"APP PORT: {APP_PORT}")
message("3", f"APP SECRET KEY: {APP_SECRET_KEY}")
message("3", f"APP SESSION PERMANENT: {SESSION_PERMANENT}")
message("3", f"APP ROOT PATH: {APP_ROOT_PATH}")
Expand Down Expand Up @@ -135,9 +136,10 @@ def handle_csrf_error(e):
case "__main__":
try:
message("2", "APP STARTED SUCCESSFULLY")
app.run(debug=DEBUG_MODE, host=APP_HOST, port = APP_PORT)
message("2", f"RUNNING ON http://{APP_HOST}:{APP_PORT}")
app.run(debug=DEBUG_MODE, host=APP_HOST, port=APP_PORT)
except:
message("1", "ERROR: APP IS DOWN")
app.run(debug=DEBUG_MODE, host=APP_HOST)
app.run(debug=DEBUG_MODE, host=APP_HOST, port=APP_PORT)
finally:
message("3", "APP SHUT DOWN")
26 changes: 26 additions & 0 deletions log.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[16.01.24|21:06:14.272815] ERROR: APP IS DOWN
[16.01.24|21:06:14.275098] APP SHUT DOWN
[16.01.24|21:06:14.323751] ERROR: APP IS DOWN
[16.01.24|21:06:14.617004] APP IS STARTING...
[16.01.24|21:06:14.637542] APP DEBUG MODE: True
[16.01.24|21:06:14.637542] APP NAME: flaskblog
[16.01.24|21:06:14.638542] APP HOST: 192.168.1.129
[16.01.24|21:06:14.638542] APP PORT: 5000
[16.01.24|21:06:14.639543] APP SECRET KEY: tE14zwqqsNGtjjm3-HOmTcBjnpEEcBrx4sAJzbR0f5c
[16.01.24|21:06:14.639543] APP SESSION PERMANENT: True
[16.01.24|21:06:14.639543] APP ROOT PATH: .
[16.01.24|21:06:14.640543] LOG FILE ROOT: log.log
[16.01.24|21:06:14.640543] LOG IN: True
[16.01.24|21:06:14.640543] REGISTRATION: True
[16.01.24|21:06:14.641544] UI MODE: STANDARD-CSS
[16.01.24|21:06:14.641544] TEMPLATE FOLDER: templates/standardUI
[16.01.24|21:06:14.642545] STATIC FOLDER: static/standardUI
[16.01.24|21:06:14.642545] DATABASE FOLDER: "/db" FOUND
[16.01.24|21:06:14.643564] USERS DATABASE: "db/users.db" FOUND
[16.01.24|21:06:14.644565] TABLE: "Users" FOUND IN "db/users.db"
[16.01.24|21:06:14.644565] POSTS DATABASE: "db/posts.db" FOUND
[16.01.24|21:06:14.645566] TABLE: "Posts" FOUND IN "db/posts.db"
[16.01.24|21:06:14.645566] COMMENTS DATABASE: "db/comments.db" FOUND
[16.01.24|21:06:14.646567] TABLE: "Comments" FOUND IN "db/comments.db"
[16.01.24|21:06:14.654608] APP STARTED SUCCESSFULLY
[16.01.24|21:06:14.654608] RUNNING ON http://192.168.1.129:5000

0 comments on commit 9fec556

Please sign in to comment.