-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
2 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
"""Logging service for the application.""" | ||
|
||
# Author: Alexander Hambley | ||
# License: MIT | ||
# Copyright (c) 2025 eScience Lab, The University of Manchester | ||
|
||
import logging | ||
|
||
|
||
def setup_logging(level: int = logging.INFO) -> None: | ||
""" | ||
Configure the logging for the application. | ||
:param level: The logging level to set. Defaults to INFO. | ||
""" | ||
logging.basicConfig( | ||
level=level, | ||
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,15 @@ | ||
"""Entry point for the Flask application.""" | ||
|
||
# Author: Alexander Hambley | ||
# License: MIT | ||
# Copyright (c) 2025 eScience Lab, The University of Manchester | ||
|
||
from app import create_app | ||
from app.services.logging_service import setup_logging | ||
|
||
app, _ = create_app() | ||
app = create_app() | ||
setup_logging() | ||
|
||
if __name__ == "__main__": | ||
# Run the Flask development server: | ||
app.run(host="0.0.0.0", debug=True) |