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";
|
||||
let __configCache;
|
||||
async function getConfig() {
|
||||
if (__configCache) return __configCache;
|
||||
@@ -15,7 +16,7 @@ export const fetchGisStationsMeasurementsService = async () => {
|
||||
if (useMocks) {
|
||||
const mockBasePath = "/api/mocks/webservice/gisStationsMeasurements";
|
||||
const mockURL = `${window.location.origin}${mockBasePath}`;
|
||||
if (process.env.NEXT_PUBLIC_DEBUG_LOG === "true") {
|
||||
if (getDebugLog()) {
|
||||
console.log("🧪 Mock-Modus aktiviert: fetchGisStationsMeasurementsService ", mockURL);
|
||||
}
|
||||
|
||||
@@ -38,7 +39,7 @@ export const fetchGisStationsMeasurementsService = async () => {
|
||||
const idUser = params.get("u");
|
||||
|
||||
const url = `${baseUrl}/GisStationsMeasurements?idMap=${idMap}&idUser=${idUser}`;
|
||||
if (process.env.NEXT_PUBLIC_DEBUG_LOG === "true") {
|
||||
if (getDebugLog()) {
|
||||
console.log("📡 fetchGisStationsMeasurementsService URL:", url);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user