mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-23 16:11:12 -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 { edgeLogger } from '../_shared/logger.ts';
|
||||
|
||||
const BASE_URL = 'https://dev.thrillwiki.com';
|
||||
|
||||
@@ -263,7 +264,7 @@ async function generateSitemap(requestId: string): Promise<{
|
||||
|
||||
const xml = generateSitemapXml(urls);
|
||||
|
||||
console.log('[Sitemap] Generated', {
|
||||
edgeLogger.info('Sitemap generated', {
|
||||
requestId,
|
||||
stats,
|
||||
sizeKB: (xml.length / 1024).toFixed(2),
|
||||
@@ -299,7 +300,7 @@ Deno.serve(async (req) => {
|
||||
// Return cached version if valid
|
||||
if (isCacheValid()) {
|
||||
const duration = Date.now() - startTime;
|
||||
console.log('[Sitemap] Cache HIT', {
|
||||
edgeLogger.info('Sitemap cache hit', {
|
||||
requestId,
|
||||
cacheAge: Date.now() - cacheTimestamp,
|
||||
duration,
|
||||
@@ -325,7 +326,7 @@ Deno.serve(async (req) => {
|
||||
|
||||
const duration = Date.now() - startTime;
|
||||
|
||||
console.log('[Sitemap] Cache MISS - Generated', {
|
||||
edgeLogger.info('Sitemap cache miss - generated', {
|
||||
requestId,
|
||||
duration,
|
||||
stats: sitemap.stats,
|
||||
@@ -344,7 +345,7 @@ Deno.serve(async (req) => {
|
||||
} catch (error) {
|
||||
const duration = Date.now() - startTime;
|
||||
|
||||
console.error('[Sitemap] Generation failed', {
|
||||
edgeLogger.error('Sitemap generation failed', {
|
||||
requestId,
|
||||
error: error instanceof Error ? error.message : String(error),
|
||||
duration,
|
||||
|
||||
Reference in New Issue
Block a user