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,4 +1,5 @@
|
||||
// /components/uiWidgets/mapLayersControlPanel/MapLayersControlPanel.js
|
||||
import { getDebugLog } from "../../../utils/configUtils";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { setSelectedArea } from "@/redux/slices/selectedAreaSlice";
|
||||
import EditModeToggle from "@/components/uiWidgets/mapLayersControlPanel/EditModeToggle";
|
||||
@@ -218,7 +219,7 @@ function MapLayersControlPanel() {
|
||||
|
||||
//------------------------------
|
||||
useEffect(() => {
|
||||
if (process.env.NEXT_PUBLIC_DEBUG_LOG === "true") {
|
||||
if (getDebugLog()) {
|
||||
window.__debug = window.__debug || {};
|
||||
window.__debug.gisStations = GisStationsStaticDistrict;
|
||||
}
|
||||
@@ -250,7 +251,7 @@ function MapLayersControlPanel() {
|
||||
}
|
||||
return isUnique;
|
||||
});
|
||||
if (process.env.NEXT_PUBLIC_DEBUG_LOG === "true") {
|
||||
if (getDebugLog()) {
|
||||
console.log("📌 stationListing aktualisiert:", filteredAreas);
|
||||
}
|
||||
}, [GisStationsStaticDistrict, GisSystemStatic]);
|
||||
|
||||
Reference in New Issue
Block a user