Skip to content

Commit feef74f

Browse files
committed
Add log when app started
1 parent 1cdd166 commit feef74f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

run.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,14 @@
55

66
from sqli.app import init as init_app
77

8+
log = logging.getLogger(__name__)
9+
810
if __name__ == '__main__':
911
logging.basicConfig(level=logging.DEBUG)
1012

1113
app = init_app(sys.argv[1:])
1214

13-
run_app(app,
14-
host=app['config']['app']['host'],
15-
port=app['config']['app']['port'])
15+
host = app['config']['app']['host']
16+
port = app['config']['app']['port']
17+
log.info(f'App is listening at http://{host}:{port}')
18+
run_app(app, host=host, port=port)

0 commit comments

Comments
 (0)