diff --git a/frontend/src/api/meta.js b/frontend/src/api/meta.js
index d8205c5f5..d8ba5d734 100644
--- a/frontend/src/api/meta.js
+++ b/frontend/src/api/meta.js
@@ -5,6 +5,7 @@ const prefix = baseURL + "debug";
const debugURLs = {
version: `${prefix}/version`,
+ lastRecipe: `${prefix}/last-recipe-json`,
};
export default {
@@ -12,4 +13,8 @@ export default {
let response = await apiReq.get(debugURLs.version);
return response.data;
},
+ async getLastJson() {
+ let response = await apiReq.get(debugURLs.lastRecipe);
+ return response.data;
+ },
};
diff --git a/frontend/src/components/Debug/LastRecipe.vue b/frontend/src/components/Debug/LastRecipe.vue
new file mode 100644
index 000000000..caaad006e
--- /dev/null
+++ b/frontend/src/components/Debug/LastRecipe.vue
@@ -0,0 +1,38 @@
+
+
+ Last Scrapped JSON Data
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/frontend/src/components/Debug/LogFile.vue b/frontend/src/components/Debug/LogFile.vue
new file mode 100644
index 000000000..47f309496
--- /dev/null
+++ b/frontend/src/components/Debug/LogFile.vue
@@ -0,0 +1,37 @@
+
+
+ Last Scrapped JSON Data
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/frontend/src/pages/Debug.vue b/frontend/src/pages/Debug.vue
new file mode 100644
index 000000000..14711b2f7
--- /dev/null
+++ b/frontend/src/pages/Debug.vue
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/frontend/src/routes.js b/frontend/src/routes.js
index e3790a4c0..5fbbde2a2 100644
--- a/frontend/src/routes.js
+++ b/frontend/src/routes.js
@@ -7,12 +7,14 @@ import SettingsPage from "./pages/SettingsPage";
import AllRecipesPage from "./pages/AllRecipesPage";
import CategoryPage from "./pages/CategoryPage";
import MeaplPlanPage from "./pages/MealPlanPage";
+import Debug from "./pages/Debug";
import MealPlanThisWeekPage from "./pages/MealPlanThisWeekPage";
import api from "@/api";
export const routes = [
{ path: "/", component: HomePage },
{ path: "/mealie", component: HomePage },
+ { path: "/debug", component: Debug },
{ path: "/search", component: SearchPage },
{ path: "/recipes/all", component: AllRecipesPage },
{ path: "/recipes/:category", component: CategoryPage },
diff --git a/mealie/app.py b/mealie/app.py
index b8781df5d..10efcb07b 100644
--- a/mealie/app.py
+++ b/mealie/app.py
@@ -3,22 +3,12 @@ from fastapi import FastAPI
from fastapi.staticfiles import StaticFiles
# import utils.startup as startup
-from app_config import APP_VERSION, PORT, PRODUCTION, WEB_PATH, docs_url, redoc_url
-from routes import (
- backup_routes,
- debug_routes,
- meal_routes,
- migration_routes,
- setting_routes,
- static_routes,
- theme_routes,
-)
-from routes.recipe import (
- all_recipe_routes,
- category_routes,
- recipe_crud_routes,
- tag_routes,
-)
+from app_config import (APP_VERSION, PORT, PRODUCTION, WEB_PATH, docs_url,
+ redoc_url)
+from routes import (backup_routes, debug_routes, meal_routes, migration_routes,
+ setting_routes, static_routes, theme_routes)
+from routes.recipe import (all_recipe_routes, category_routes,
+ recipe_crud_routes, tag_routes)
from services.settings_services import default_settings_init
from utils.logger import logger
@@ -92,6 +82,7 @@ if __name__ == "__main__":
port=PORT,
reload=True,
debug=True,
+ log_level="info",
workers=1,
forwarded_allow_ips="*",
)
diff --git a/mealie/routes/debug_routes.py b/mealie/routes/debug_routes.py
index 2c0d8f3b7..bf7829047 100644
--- a/mealie/routes/debug_routes.py
+++ b/mealie/routes/debug_routes.py
@@ -22,7 +22,7 @@ async def get_last_recipe_json():
return json.loads(f.read())
-@router.get("/log/{num}", response_class=HTMLResponse)
+@router.get("/log/{num}")
async def get_log(num: int):
""" Doc Str """
with open(LOGGER_FILE, "rb") as f:
@@ -53,4 +53,4 @@ def tail(f, lines=20):
block_end_byte -= BLOCK_SIZE
block_number -= 1
all_read_text = b"".join(reversed(blocks))
- return b"
".join(all_read_text.splitlines()[-total_lines_wanted:])
+ return b"/n".join(all_read_text.splitlines()[-total_lines_wanted:])