Debug-Logging zentralisiert: Nutzung von process.env.NEXT_PUBLIC_DEBUG_LOG entfernt und auf getDebugLog() mit config.json umgestellt
- Alle Vorkommen von process.env.NEXT_PUBLIC_DEBUG_LOG entfernt - Debug-Konfiguration erfolgt jetzt ausschließlich über public/config.json - getDebugLog()-Utility überall verwendet - .env-Dateien werden für Debug-Logging nicht mehr benötigt - Alle betroffenen Komponenten, Services und API
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { getDebugLog } from "@/utils/configUtils.js";
|
||||
// components/contextmenu/useMapContextMenu.js
|
||||
import { toast } from "react-toastify";
|
||||
import { zoomIn, zoomOut, centerHere } from "../../utils/zoomAndCenterUtils";
|
||||
@@ -71,7 +72,7 @@ const addItemsToMapContextMenu = (
|
||||
if (!menuItemAdded && map && map.contextmenu) {
|
||||
const editMode = localStorage.getItem("editMode") === "true";
|
||||
if (editMode) {
|
||||
if (process.env.NEXT_PUBLIC_DEBUG_LOG === "true") {
|
||||
if (getDebugLog()) {
|
||||
console.log("editMode localStorage:", localStorage.getItem("editMode"));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user