mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-23 15:51:13 -05:00
Fix logging policy violation
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import { createClient } from 'https://esm.sh/@supabase/supabase-js@2.57.4';
|
import { createClient } from 'https://esm.sh/@supabase/supabase-js@2.57.4';
|
||||||
|
import { edgeLogger } from '../_shared/logger.ts';
|
||||||
|
|
||||||
const BASE_URL = 'https://dev.thrillwiki.com';
|
const BASE_URL = 'https://dev.thrillwiki.com';
|
||||||
|
|
||||||
@@ -263,7 +264,7 @@ async function generateSitemap(requestId: string): Promise<{
|
|||||||
|
|
||||||
const xml = generateSitemapXml(urls);
|
const xml = generateSitemapXml(urls);
|
||||||
|
|
||||||
console.log('[Sitemap] Generated', {
|
edgeLogger.info('Sitemap generated', {
|
||||||
requestId,
|
requestId,
|
||||||
stats,
|
stats,
|
||||||
sizeKB: (xml.length / 1024).toFixed(2),
|
sizeKB: (xml.length / 1024).toFixed(2),
|
||||||
@@ -299,7 +300,7 @@ Deno.serve(async (req) => {
|
|||||||
// Return cached version if valid
|
// Return cached version if valid
|
||||||
if (isCacheValid()) {
|
if (isCacheValid()) {
|
||||||
const duration = Date.now() - startTime;
|
const duration = Date.now() - startTime;
|
||||||
console.log('[Sitemap] Cache HIT', {
|
edgeLogger.info('Sitemap cache hit', {
|
||||||
requestId,
|
requestId,
|
||||||
cacheAge: Date.now() - cacheTimestamp,
|
cacheAge: Date.now() - cacheTimestamp,
|
||||||
duration,
|
duration,
|
||||||
@@ -325,7 +326,7 @@ Deno.serve(async (req) => {
|
|||||||
|
|
||||||
const duration = Date.now() - startTime;
|
const duration = Date.now() - startTime;
|
||||||
|
|
||||||
console.log('[Sitemap] Cache MISS - Generated', {
|
edgeLogger.info('Sitemap cache miss - generated', {
|
||||||
requestId,
|
requestId,
|
||||||
duration,
|
duration,
|
||||||
stats: sitemap.stats,
|
stats: sitemap.stats,
|
||||||
@@ -344,7 +345,7 @@ Deno.serve(async (req) => {
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
const duration = Date.now() - startTime;
|
const duration = Date.now() - startTime;
|
||||||
|
|
||||||
console.error('[Sitemap] Generation failed', {
|
edgeLogger.error('Sitemap generation failed', {
|
||||||
requestId,
|
requestId,
|
||||||
error: error instanceof Error ? error.message : String(error),
|
error: error instanceof Error ? error.message : String(error),
|
||||||
duration,
|
duration,
|
||||||
|
|||||||
Reference in New Issue
Block a user