[{"data":1,"prerenderedAt":2140},["ShallowReactive",2],{"navigation_docs":3,"-frameworks-cloudflare-workers":282,"-frameworks-cloudflare-workers-surround":2135},[4,30,65,105,188,252,268],{"title":5,"path":6,"stem":7,"children":8,"page":29},"Getting Started","\u002Fgetting-started","1.getting-started",[9,14,19,24],{"title":10,"path":11,"stem":12,"icon":13},"Introduction","\u002Fgetting-started\u002Fintroduction","1.getting-started\u002F1.introduction","i-lucide-info",{"title":15,"path":16,"stem":17,"icon":18},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F2.installation","i-lucide-download",{"title":20,"path":21,"stem":22,"icon":23},"Quick Start","\u002Fgetting-started\u002Fquick-start","1.getting-started\u002F3.quick-start","i-lucide-zap",{"title":25,"path":26,"stem":27,"icon":28},"Agent Skills","\u002Fgetting-started\u002Fagent-skills","1.getting-started\u002F4.agent-skills","i-lucide-sparkles",false,{"title":31,"path":32,"stem":33,"children":34,"page":29},"Logging","\u002Flogging","2.logging",[35,40,45,50,55,60],{"title":36,"path":37,"stem":38,"icon":39},"Overview","\u002Flogging\u002Foverview","2.logging\u002F0.overview","i-lucide-list",{"title":41,"path":42,"stem":43,"icon":44},"Simple Logging","\u002Flogging\u002Fsimple-logging","2.logging\u002F1.simple-logging","i-lucide-terminal",{"title":46,"path":47,"stem":48,"icon":49},"Wide Events","\u002Flogging\u002Fwide-events","2.logging\u002F2.wide-events","i-lucide-layers",{"title":51,"path":52,"stem":53,"icon":54},"Structured Errors","\u002Flogging\u002Fstructured-errors","2.logging\u002F3.structured-errors","i-lucide-shield-alert",{"title":56,"path":57,"stem":58,"icon":59},"Client Logging","\u002Flogging\u002Fclient-logging","2.logging\u002F4.client-logging","i-lucide-monitor",{"title":61,"path":62,"stem":63,"icon":64},"AI SDK Integration","\u002Flogging\u002Fai-sdk","2.logging\u002F5.ai-sdk","i-simple-icons-vercel",{"title":66,"path":67,"stem":68,"children":69,"page":29},"Core Concepts","\u002Fcore-concepts","3.core-concepts",[70,75,80,85,90,95,100],{"title":71,"path":72,"stem":73,"icon":74},"Lifecycle","\u002Fcore-concepts\u002Flifecycle","3.core-concepts\u002F0.lifecycle","i-lucide-arrow-right-left",{"title":76,"path":77,"stem":78,"icon":79},"Configuration","\u002Fcore-concepts\u002Fconfiguration","3.core-concepts\u002F1.configuration","i-lucide-settings",{"title":81,"path":82,"stem":83,"icon":84},"Sampling","\u002Fcore-concepts\u002Fsampling","3.core-concepts\u002F2.sampling","i-lucide-filter",{"title":86,"path":87,"stem":88,"icon":89},"Typed Fields","\u002Fcore-concepts\u002Ftyped-fields","3.core-concepts\u002F3.typed-fields","i-simple-icons-typescript",{"title":91,"path":92,"stem":93,"icon":94},"Best Practices","\u002Fcore-concepts\u002Fbest-practices","3.core-concepts\u002F4.best-practices","i-lucide-shield-check",{"title":96,"path":97,"stem":98,"icon":99},"Performance","\u002Fcore-concepts\u002Fperformance","3.core-concepts\u002F5.performance","i-lucide-gauge",{"title":101,"path":102,"stem":103,"icon":104},"Vite Plugin","\u002Fcore-concepts\u002Fvite-plugin","3.core-concepts\u002F6.vite-plugin","i-custom-vite",{"title":106,"path":107,"stem":108,"children":109,"page":29},"Frameworks","\u002Fframeworks","4.frameworks",[110,114,119,124,129,134,139,144,149,154,159,164,169,174,178,183],{"title":36,"path":111,"stem":112,"icon":113},"\u002Fframeworks\u002Foverview","4.frameworks\u002F00.overview","i-lucide-layout-grid",{"title":115,"path":116,"stem":117,"icon":118},"Nuxt","\u002Fframeworks\u002Fnuxt","4.frameworks\u002F01.nuxt","i-simple-icons-nuxtdotjs",{"title":120,"path":121,"stem":122,"icon":123},"Next.js","\u002Fframeworks\u002Fnextjs","4.frameworks\u002F02.nextjs","i-simple-icons-nextdotjs",{"title":125,"path":126,"stem":127,"icon":128},"SvelteKit","\u002Fframeworks\u002Fsveltekit","4.frameworks\u002F03.sveltekit","i-simple-icons-svelte",{"title":130,"path":131,"stem":132,"icon":133},"Nitro","\u002Fframeworks\u002Fnitro","4.frameworks\u002F04.nitro","i-custom-nitro",{"title":135,"path":136,"stem":137,"icon":138},"TanStack Start","\u002Fframeworks\u002Ftanstack-start","4.frameworks\u002F05.tanstack-start","i-custom-tanstack",{"title":140,"path":141,"stem":142,"icon":143},"NestJS","\u002Fframeworks\u002Fnestjs","4.frameworks\u002F06.nestjs","i-simple-icons-nestjs",{"title":145,"path":146,"stem":147,"icon":148},"Express","\u002Fframeworks\u002Fexpress","4.frameworks\u002F07.express","i-simple-icons-express",{"title":150,"path":151,"stem":152,"icon":153},"Hono","\u002Fframeworks\u002Fhono","4.frameworks\u002F08.hono","i-simple-icons-hono",{"title":155,"path":156,"stem":157,"icon":158},"Fastify","\u002Fframeworks\u002Ffastify","4.frameworks\u002F09.fastify","i-simple-icons-fastify",{"title":160,"path":161,"stem":162,"icon":163},"Elysia","\u002Fframeworks\u002Felysia","4.frameworks\u002F10.elysia","i-custom-elysia",{"title":165,"path":166,"stem":167,"icon":168},"React Router","\u002Fframeworks\u002Freact-router","4.frameworks\u002F11.react-router","i-custom-reactrouter",{"title":170,"path":171,"stem":172,"icon":173},"Cloudflare Workers","\u002Fframeworks\u002Fcloudflare-workers","4.frameworks\u002F12.cloudflare-workers","i-simple-icons-cloudflare",{"title":175,"path":176,"stem":177,"icon":89},"Standalone","\u002Fframeworks\u002Fstandalone","4.frameworks\u002F13.standalone",{"title":179,"path":180,"stem":181,"icon":182},"Astro","\u002Fframeworks\u002Fastro","4.frameworks\u002F14.astro","i-simple-icons-astro",{"title":184,"path":185,"stem":186,"icon":187},"Custom Integration","\u002Fframeworks\u002Fcustom-integration","4.frameworks\u002F15.custom-integration","i-lucide-puzzle",{"title":189,"path":190,"stem":191,"children":192,"page":29},"Adapters","\u002Fadapters","5.adapters",[193,197,202,207,212,217,222,227,232,237,242,247],{"title":36,"path":194,"stem":195,"icon":196},"\u002Fadapters\u002Foverview","5.adapters\u002F1.overview","i-custom-plug",{"title":198,"path":199,"stem":200,"icon":201},"Custom Adapters","\u002Fadapters\u002Fcustom","5.adapters\u002F10.custom","i-lucide-code",{"title":203,"path":204,"stem":205,"icon":206},"Pipeline","\u002Fadapters\u002Fpipeline","5.adapters\u002F11.pipeline","i-lucide-workflow",{"title":208,"path":209,"stem":210,"icon":211},"Browser","\u002Fadapters\u002Fbrowser","5.adapters\u002F12.browser","i-lucide-globe",{"title":213,"path":214,"stem":215,"icon":216},"Axiom","\u002Fadapters\u002Faxiom","5.adapters\u002F2.axiom","i-custom-axiom",{"title":218,"path":219,"stem":220,"icon":221},"OTLP","\u002Fadapters\u002Fotlp","5.adapters\u002F3.otlp","i-simple-icons-opentelemetry",{"title":223,"path":224,"stem":225,"icon":226},"PostHog","\u002Fadapters\u002Fposthog","5.adapters\u002F4.posthog","i-simple-icons-posthog",{"title":228,"path":229,"stem":230,"icon":231},"Sentry","\u002Fadapters\u002Fsentry","5.adapters\u002F5.sentry","i-simple-icons-sentry",{"title":233,"path":234,"stem":235,"icon":236},"Better Stack","\u002Fadapters\u002Fbetter-stack","5.adapters\u002F6.better-stack","i-simple-icons-betterstack",{"title":238,"path":239,"stem":240,"icon":241},"File System","\u002Fadapters\u002Ffs","5.adapters\u002F7.fs","i-lucide-hard-drive",{"title":243,"path":244,"stem":245,"icon":246},"Datadog","\u002Fadapters\u002Fdatadog","5.adapters\u002F8.datadog","i-simple-icons-datadog",{"title":248,"path":249,"stem":250,"icon":251},"HyperDX","\u002Fadapters\u002Fhyperdx","5.adapters\u002F9.hyperdx","i-custom-hyperdx",{"title":253,"path":254,"stem":255,"children":256,"page":29},"Enrichers","\u002Fenrichers","6.enrichers",[257,260,264],{"title":36,"path":258,"stem":259,"icon":28},"\u002Fenrichers\u002Foverview","6.enrichers\u002F1.overview",{"title":261,"path":262,"stem":263,"icon":187},"Built-in","\u002Fenrichers\u002Fbuilt-in","6.enrichers\u002F2.built-in",{"title":265,"path":266,"stem":267,"icon":201},"Custom","\u002Fenrichers\u002Fcustom","6.enrichers\u002F3.custom",{"title":269,"path":270,"stem":271,"children":272,"page":29},"NuxtHub","\u002Fnuxthub","7.nuxthub",[273,277],{"title":36,"path":274,"stem":275,"icon":276},"\u002Fnuxthub\u002Foverview","7.nuxthub\u002F1.overview","i-lucide-database",{"title":278,"path":279,"stem":280,"icon":281},"Retention","\u002Fnuxthub\u002Fretention","7.nuxthub\u002F2.retention","i-lucide-clock",{"id":283,"title":170,"body":284,"description":2128,"extension":2129,"links":2130,"meta":2131,"navigation":2132,"path":171,"seo":2133,"stem":172,"__hash__":2134},"docs\u002F4.frameworks\u002F12.cloudflare-workers.md",{"type":285,"value":286,"toc":2115},"minimark",[287,300,381,385,390,411,415,698,716,724,727,730,1118,1184,1188,1195,1716,1719,1731,1735,1741,2025,2033,2037,2040,2058,2062,2075,2079,2111],[288,289,290,291,295,296,299],"p",{},"The ",[292,293,294],"code",{},"evlog\u002Fworkers"," adapter provides factory functions for creating request-scoped loggers with Cloudflare-specific context. Unlike framework integrations, Workers require manual ",[292,297,298],{},"log.emit()"," calls since there is no middleware lifecycle to hook into.",[301,302,303],"code-collapse",{},[304,305,311],"pre",{"className":306,"code":307,"filename":308,"language":309,"meta":310,"style":310},"language-txt shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","Set up evlog in my Cloudflare Worker.\n\n- Install evlog: pnpm add evlog\n- Import initLogger and createRequestLogger from 'evlog'\n- Call initLogger({ service: 'my-worker' }) at the top level\n- In the fetch handler, create a logger with createRequestLogger({ method, path })\n- Use log.set() to accumulate context throughout the request\n- Call log.emit() manually before returning the response (no middleware lifecycle)\n\nDocs: https:\u002F\u002Fwww.evlog.dev\u002Fframeworks\u002Fcloudflare-workers\nAdapters: https:\u002F\u002Fwww.evlog.dev\u002Fadapters\n","Prompt","txt","",[292,312,313,321,328,334,340,346,352,358,364,369,375],{"__ignoreMap":310},[314,315,318],"span",{"class":316,"line":317},"line",1,[314,319,320],{},"Set up evlog in my Cloudflare Worker.\n",[314,322,324],{"class":316,"line":323},2,[314,325,327],{"emptyLinePlaceholder":326},true,"\n",[314,329,331],{"class":316,"line":330},3,[314,332,333],{},"- Install evlog: pnpm add evlog\n",[314,335,337],{"class":316,"line":336},4,[314,338,339],{},"- Import initLogger and createRequestLogger from 'evlog'\n",[314,341,343],{"class":316,"line":342},5,[314,344,345],{},"- Call initLogger({ service: 'my-worker' }) at the top level\n",[314,347,349],{"class":316,"line":348},6,[314,350,351],{},"- In the fetch handler, create a logger with createRequestLogger({ method, path })\n",[314,353,355],{"class":316,"line":354},7,[314,356,357],{},"- Use log.set() to accumulate context throughout the request\n",[314,359,361],{"class":316,"line":360},8,[314,362,363],{},"- Call log.emit() manually before returning the response (no middleware lifecycle)\n",[314,365,367],{"class":316,"line":366},9,[314,368,327],{"emptyLinePlaceholder":326},[314,370,372],{"class":316,"line":371},10,[314,373,374],{},"Docs: https:\u002F\u002Fwww.evlog.dev\u002Fframeworks\u002Fcloudflare-workers\n",[314,376,378],{"class":316,"line":377},11,[314,379,380],{},"Adapters: https:\u002F\u002Fwww.evlog.dev\u002Fadapters\n",[382,383,20],"h2",{"id":384},"quick-start",[386,387,389],"h3",{"id":388},"_1-install","1. Install",[304,391,396],{"className":392,"code":393,"filename":394,"language":395,"meta":310,"style":310},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","bun add evlog\n","Terminal","bash",[292,397,398],{"__ignoreMap":310},[314,399,400,404,408],{"class":316,"line":317},[314,401,403],{"class":402},"sBMFI","bun",[314,405,407],{"class":406},"sfazB"," add",[314,409,410],{"class":406}," evlog\n",[386,412,414],{"id":413},"_2-initialize-and-create-request-loggers","2. Initialize and create request loggers",[304,416,421],{"className":417,"code":418,"filename":419,"language":420,"meta":310,"style":310},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { initWorkersLogger, createWorkersLogger } from 'evlog\u002Fworkers'\n\ninitWorkersLogger({\n  env: { service: 'my-worker' },\n})\n\nexport default {\n  async fetch(request: Request, env: Env): Promise\u003CResponse> {\n    const log = createWorkersLogger(request)\n\n    log.set({ action: 'handle_request' })\n\n    \u002F\u002F ... your handler logic\n\n    log.emit()\n    return Response.json({ ok: true })\n  },\n}\n","src\u002Fworker.ts","typescript",[292,422,423,457,461,473,500,508,512,523,570,589,593,625,630,637,642,655,686,692],{"__ignoreMap":310},[314,424,425,429,433,437,440,443,446,449,452,454],{"class":316,"line":317},[314,426,428],{"class":427},"s7zQu","import",[314,430,432],{"class":431},"sMK4o"," {",[314,434,436],{"class":435},"sTEyZ"," initWorkersLogger",[314,438,439],{"class":431},",",[314,441,442],{"class":435}," createWorkersLogger",[314,444,445],{"class":431}," }",[314,447,448],{"class":427}," from",[314,450,451],{"class":431}," '",[314,453,294],{"class":406},[314,455,456],{"class":431},"'\n",[314,458,459],{"class":316,"line":323},[314,460,327],{"emptyLinePlaceholder":326},[314,462,463,467,470],{"class":316,"line":330},[314,464,466],{"class":465},"s2Zo4","initWorkersLogger",[314,468,469],{"class":435},"(",[314,471,472],{"class":431},"{\n",[314,474,475,479,482,484,487,489,491,494,497],{"class":316,"line":336},[314,476,478],{"class":477},"swJcz","  env",[314,480,481],{"class":431},":",[314,483,432],{"class":431},[314,485,486],{"class":477}," service",[314,488,481],{"class":431},[314,490,451],{"class":431},[314,492,493],{"class":406},"my-worker",[314,495,496],{"class":431},"'",[314,498,499],{"class":431}," },\n",[314,501,502,505],{"class":316,"line":342},[314,503,504],{"class":431},"}",[314,506,507],{"class":435},")\n",[314,509,510],{"class":316,"line":348},[314,511,327],{"emptyLinePlaceholder":326},[314,513,514,517,520],{"class":316,"line":354},[314,515,516],{"class":427},"export",[314,518,519],{"class":427}," default",[314,521,522],{"class":431}," {\n",[314,524,525,529,532,534,538,540,543,545,548,550,553,556,559,562,565,568],{"class":316,"line":360},[314,526,528],{"class":527},"spNyl","  async",[314,530,531],{"class":477}," fetch",[314,533,469],{"class":431},[314,535,537],{"class":536},"sHdIc","request",[314,539,481],{"class":431},[314,541,542],{"class":402}," Request",[314,544,439],{"class":431},[314,546,547],{"class":536}," env",[314,549,481],{"class":431},[314,551,552],{"class":402}," Env",[314,554,555],{"class":431},"):",[314,557,558],{"class":402}," Promise",[314,560,561],{"class":431},"\u003C",[314,563,564],{"class":402},"Response",[314,566,567],{"class":431},">",[314,569,522],{"class":431},[314,571,572,575,578,581,583,585,587],{"class":316,"line":366},[314,573,574],{"class":527},"    const",[314,576,577],{"class":435}," log",[314,579,580],{"class":431}," =",[314,582,442],{"class":465},[314,584,469],{"class":477},[314,586,537],{"class":435},[314,588,507],{"class":477},[314,590,591],{"class":316,"line":371},[314,592,327],{"emptyLinePlaceholder":326},[314,594,595,598,601,604,606,609,612,614,616,619,621,623],{"class":316,"line":377},[314,596,597],{"class":435},"    log",[314,599,600],{"class":431},".",[314,602,603],{"class":465},"set",[314,605,469],{"class":477},[314,607,608],{"class":431},"{",[314,610,611],{"class":477}," action",[314,613,481],{"class":431},[314,615,451],{"class":431},[314,617,618],{"class":406},"handle_request",[314,620,496],{"class":431},[314,622,445],{"class":431},[314,624,507],{"class":477},[314,626,628],{"class":316,"line":627},12,[314,629,327],{"emptyLinePlaceholder":326},[314,631,633],{"class":316,"line":632},13,[314,634,636],{"class":635},"sHwdD","    \u002F\u002F ... your handler logic\n",[314,638,640],{"class":316,"line":639},14,[314,641,327],{"emptyLinePlaceholder":326},[314,643,645,647,649,652],{"class":316,"line":644},15,[314,646,597],{"class":435},[314,648,600],{"class":431},[314,650,651],{"class":465},"emit",[314,653,654],{"class":477},"()\n",[314,656,658,661,664,666,669,671,673,676,678,682,684],{"class":316,"line":657},16,[314,659,660],{"class":427},"    return",[314,662,663],{"class":435}," Response",[314,665,600],{"class":431},[314,667,668],{"class":465},"json",[314,670,469],{"class":477},[314,672,608],{"class":431},[314,674,675],{"class":477}," ok",[314,677,481],{"class":431},[314,679,681],{"class":680},"sfNiH"," true",[314,683,445],{"class":431},[314,685,507],{"class":477},[314,687,689],{"class":316,"line":688},17,[314,690,691],{"class":431},"  },\n",[314,693,695],{"class":316,"line":694},18,[314,696,697],{"class":431},"}\n",[288,699,700,703,704,707,708,711,712,715],{},[292,701,702],{},"createWorkersLogger(request)"," automatically extracts ",[292,705,706],{},"method",", ",[292,709,710],{},"path",", and ",[292,713,714],{},"cf-ray"," from the request.",[717,718,720,721,723],"callout",{"color":719,"icon":13},"info","You must call ",[292,722,298],{}," manually before returning a response. Workers don't have a request lifecycle hook to auto-emit.",[382,725,46],{"id":726},"wide-events",[288,728,729],{},"Build up context progressively, then emit at the end:",[304,731,733],{"className":417,"code":732,"filename":419,"language":420,"meta":310,"style":310},"export default {\n  async fetch(request: Request, env: Env): Promise\u003CResponse> {\n    const log = createWorkersLogger(request)\n    const url = new URL(request.url)\n\n    log.set({ route: url.pathname })\n\n    const user = await env.DB.prepare('SELECT * FROM users WHERE id = ?').bind(url.searchParams.get('userId')).first()\n    log.set({ user: { id: user.id, plan: user.plan } })\n\n    const orders = await env.DB.prepare('SELECT COUNT(*) as count FROM orders WHERE user_id = ?').bind(user.id).first()\n    log.set({ orders: { count: orders.count } })\n\n    log.emit()\n    return Response.json({ user, orders })\n  },\n}\n",[292,734,735,743,777,793,819,823,851,855,929,979,983,1036,1072,1076,1086,1110,1114],{"__ignoreMap":310},[314,736,737,739,741],{"class":316,"line":317},[314,738,516],{"class":427},[314,740,519],{"class":427},[314,742,522],{"class":431},[314,744,745,747,749,751,753,755,757,759,761,763,765,767,769,771,773,775],{"class":316,"line":323},[314,746,528],{"class":527},[314,748,531],{"class":477},[314,750,469],{"class":431},[314,752,537],{"class":536},[314,754,481],{"class":431},[314,756,542],{"class":402},[314,758,439],{"class":431},[314,760,547],{"class":536},[314,762,481],{"class":431},[314,764,552],{"class":402},[314,766,555],{"class":431},[314,768,558],{"class":402},[314,770,561],{"class":431},[314,772,564],{"class":402},[314,774,567],{"class":431},[314,776,522],{"class":431},[314,778,779,781,783,785,787,789,791],{"class":316,"line":330},[314,780,574],{"class":527},[314,782,577],{"class":435},[314,784,580],{"class":431},[314,786,442],{"class":465},[314,788,469],{"class":477},[314,790,537],{"class":435},[314,792,507],{"class":477},[314,794,795,797,800,802,805,808,810,812,814,817],{"class":316,"line":336},[314,796,574],{"class":527},[314,798,799],{"class":435}," url",[314,801,580],{"class":431},[314,803,804],{"class":431}," new",[314,806,807],{"class":465}," URL",[314,809,469],{"class":477},[314,811,537],{"class":435},[314,813,600],{"class":431},[314,815,816],{"class":435},"url",[314,818,507],{"class":477},[314,820,821],{"class":316,"line":342},[314,822,327],{"emptyLinePlaceholder":326},[314,824,825,827,829,831,833,835,838,840,842,844,847,849],{"class":316,"line":348},[314,826,597],{"class":435},[314,828,600],{"class":431},[314,830,603],{"class":465},[314,832,469],{"class":477},[314,834,608],{"class":431},[314,836,837],{"class":477}," route",[314,839,481],{"class":431},[314,841,799],{"class":435},[314,843,600],{"class":431},[314,845,846],{"class":435},"pathname",[314,848,445],{"class":431},[314,850,507],{"class":477},[314,852,853],{"class":316,"line":354},[314,854,327],{"emptyLinePlaceholder":326},[314,856,857,859,862,864,867,869,871,874,876,879,881,883,886,888,891,893,896,898,900,902,905,907,910,912,914,917,919,922,924,927],{"class":316,"line":360},[314,858,574],{"class":527},[314,860,861],{"class":435}," user",[314,863,580],{"class":431},[314,865,866],{"class":427}," await",[314,868,547],{"class":435},[314,870,600],{"class":431},[314,872,873],{"class":435},"DB",[314,875,600],{"class":431},[314,877,878],{"class":465},"prepare",[314,880,469],{"class":477},[314,882,496],{"class":431},[314,884,885],{"class":406},"SELECT * FROM users WHERE id = ?",[314,887,496],{"class":431},[314,889,890],{"class":477},")",[314,892,600],{"class":431},[314,894,895],{"class":465},"bind",[314,897,469],{"class":477},[314,899,816],{"class":435},[314,901,600],{"class":431},[314,903,904],{"class":435},"searchParams",[314,906,600],{"class":431},[314,908,909],{"class":465},"get",[314,911,469],{"class":477},[314,913,496],{"class":431},[314,915,916],{"class":406},"userId",[314,918,496],{"class":431},[314,920,921],{"class":477},"))",[314,923,600],{"class":431},[314,925,926],{"class":465},"first",[314,928,654],{"class":477},[314,930,931,933,935,937,939,941,943,945,947,950,952,954,956,959,961,964,966,968,970,973,975,977],{"class":316,"line":366},[314,932,597],{"class":435},[314,934,600],{"class":431},[314,936,603],{"class":465},[314,938,469],{"class":477},[314,940,608],{"class":431},[314,942,861],{"class":477},[314,944,481],{"class":431},[314,946,432],{"class":431},[314,948,949],{"class":477}," id",[314,951,481],{"class":431},[314,953,861],{"class":435},[314,955,600],{"class":431},[314,957,958],{"class":435},"id",[314,960,439],{"class":431},[314,962,963],{"class":477}," plan",[314,965,481],{"class":431},[314,967,861],{"class":435},[314,969,600],{"class":431},[314,971,972],{"class":435},"plan",[314,974,445],{"class":431},[314,976,445],{"class":431},[314,978,507],{"class":477},[314,980,981],{"class":316,"line":371},[314,982,327],{"emptyLinePlaceholder":326},[314,984,985,987,990,992,994,996,998,1000,1002,1004,1006,1008,1011,1013,1015,1017,1019,1021,1024,1026,1028,1030,1032,1034],{"class":316,"line":377},[314,986,574],{"class":527},[314,988,989],{"class":435}," orders",[314,991,580],{"class":431},[314,993,866],{"class":427},[314,995,547],{"class":435},[314,997,600],{"class":431},[314,999,873],{"class":435},[314,1001,600],{"class":431},[314,1003,878],{"class":465},[314,1005,469],{"class":477},[314,1007,496],{"class":431},[314,1009,1010],{"class":406},"SELECT COUNT(*) as count FROM orders WHERE user_id = ?",[314,1012,496],{"class":431},[314,1014,890],{"class":477},[314,1016,600],{"class":431},[314,1018,895],{"class":465},[314,1020,469],{"class":477},[314,1022,1023],{"class":435},"user",[314,1025,600],{"class":431},[314,1027,958],{"class":435},[314,1029,890],{"class":477},[314,1031,600],{"class":431},[314,1033,926],{"class":465},[314,1035,654],{"class":477},[314,1037,1038,1040,1042,1044,1046,1048,1050,1052,1054,1057,1059,1061,1063,1066,1068,1070],{"class":316,"line":627},[314,1039,597],{"class":435},[314,1041,600],{"class":431},[314,1043,603],{"class":465},[314,1045,469],{"class":477},[314,1047,608],{"class":431},[314,1049,989],{"class":477},[314,1051,481],{"class":431},[314,1053,432],{"class":431},[314,1055,1056],{"class":477}," count",[314,1058,481],{"class":431},[314,1060,989],{"class":435},[314,1062,600],{"class":431},[314,1064,1065],{"class":435},"count",[314,1067,445],{"class":431},[314,1069,445],{"class":431},[314,1071,507],{"class":477},[314,1073,1074],{"class":316,"line":632},[314,1075,327],{"emptyLinePlaceholder":326},[314,1077,1078,1080,1082,1084],{"class":316,"line":639},[314,1079,597],{"class":435},[314,1081,600],{"class":431},[314,1083,651],{"class":465},[314,1085,654],{"class":477},[314,1087,1088,1090,1092,1094,1096,1098,1100,1102,1104,1106,1108],{"class":316,"line":644},[314,1089,660],{"class":427},[314,1091,663],{"class":435},[314,1093,600],{"class":431},[314,1095,668],{"class":465},[314,1097,469],{"class":477},[314,1099,608],{"class":431},[314,1101,861],{"class":435},[314,1103,439],{"class":431},[314,1105,989],{"class":435},[314,1107,445],{"class":431},[314,1109,507],{"class":477},[314,1111,1112],{"class":316,"line":657},[314,1113,691],{"class":431},[314,1115,1116],{"class":316,"line":688},[314,1117,697],{"class":431},[304,1119,1122],{"className":392,"code":1120,"filename":1121,"language":395,"meta":310,"style":310},"14:58:15 INFO [my-worker] GET \u002Fapi\u002Fusers 200 in 12ms\n  ├─ orders: count=5\n  ├─ user: id=usr_123 plan=pro\n  ├─ route: \u002Fapi\u002Fusers\n  └─ requestId: 4a8ff3a8-...\n","Terminal output",[292,1123,1124,1135,1150,1163,1173],{"__ignoreMap":310},[314,1125,1126,1129,1132],{"class":316,"line":317},[314,1127,1128],{"class":402},"14:58:15",[314,1130,1131],{"class":406}," INFO",[314,1133,1134],{"class":435}," [my-worker] GET \u002Fapi\u002Fusers 200 in 12ms\n",[314,1136,1137,1140,1143,1146],{"class":316,"line":323},[314,1138,1139],{"class":402},"  ├─",[314,1141,1142],{"class":406}," orders:",[314,1144,1145],{"class":406}," count=",[314,1147,1149],{"class":1148},"sbssI","5\n",[314,1151,1152,1154,1157,1160],{"class":316,"line":330},[314,1153,1139],{"class":402},[314,1155,1156],{"class":406}," user:",[314,1158,1159],{"class":406}," id=usr_123",[314,1161,1162],{"class":406}," plan=pro\n",[314,1164,1165,1167,1170],{"class":316,"line":336},[314,1166,1139],{"class":402},[314,1168,1169],{"class":406}," route:",[314,1171,1172],{"class":406}," \u002Fapi\u002Fusers\n",[314,1174,1175,1178,1181],{"class":316,"line":342},[314,1176,1177],{"class":402},"  └─",[314,1179,1180],{"class":406}," requestId:",[314,1182,1183],{"class":406}," 4a8ff3a8-...\n",[382,1185,1187],{"id":1186},"error-handling","Error Handling",[288,1189,1190,1191,1194],{},"Use ",[292,1192,1193],{},"createError"," for structured errors and handle them with try\u002Fcatch:",[304,1196,1198],{"className":417,"code":1197,"filename":419,"language":420,"meta":310,"style":310},"import { createError, parseError } from 'evlog'\n\nexport default {\n  async fetch(request: Request, env: Env): Promise\u003CResponse> {\n    const log = createWorkersLogger(request)\n\n    try {\n      const body = await request.json()\n      log.set({ payment: { amount: body.amount } })\n\n      if (body.amount \u003C= 0) {\n        throw createError({\n          status: 400,\n          message: 'Invalid payment amount',\n          why: 'The amount must be a positive number',\n          fix: 'Pass a positive integer in cents',\n        })\n      }\n\n      log.emit()\n      return Response.json({ success: true })\n    } catch (error) {\n      log.error(error instanceof Error ? error : new Error(String(error)))\n      log.emit()\n\n      const parsed = parseError(error)\n      return Response.json({\n        message: parsed.message,\n        why: parsed.why,\n        fix: parsed.fix,\n      }, { status: parsed.status })\n    }\n  },\n}\n",[292,1199,1200,1225,1229,1237,1271,1287,1291,1298,1319,1357,1361,1387,1398,1411,1427,1443,1459,1466,1471,1476,1487,1514,1532,1576,1587,1592,1610,1625,1642,1659,1676,1700,1706,1711],{"__ignoreMap":310},[314,1201,1202,1204,1206,1209,1211,1214,1216,1218,1220,1223],{"class":316,"line":317},[314,1203,428],{"class":427},[314,1205,432],{"class":431},[314,1207,1208],{"class":435}," createError",[314,1210,439],{"class":431},[314,1212,1213],{"class":435}," parseError",[314,1215,445],{"class":431},[314,1217,448],{"class":427},[314,1219,451],{"class":431},[314,1221,1222],{"class":406},"evlog",[314,1224,456],{"class":431},[314,1226,1227],{"class":316,"line":323},[314,1228,327],{"emptyLinePlaceholder":326},[314,1230,1231,1233,1235],{"class":316,"line":330},[314,1232,516],{"class":427},[314,1234,519],{"class":427},[314,1236,522],{"class":431},[314,1238,1239,1241,1243,1245,1247,1249,1251,1253,1255,1257,1259,1261,1263,1265,1267,1269],{"class":316,"line":336},[314,1240,528],{"class":527},[314,1242,531],{"class":477},[314,1244,469],{"class":431},[314,1246,537],{"class":536},[314,1248,481],{"class":431},[314,1250,542],{"class":402},[314,1252,439],{"class":431},[314,1254,547],{"class":536},[314,1256,481],{"class":431},[314,1258,552],{"class":402},[314,1260,555],{"class":431},[314,1262,558],{"class":402},[314,1264,561],{"class":431},[314,1266,564],{"class":402},[314,1268,567],{"class":431},[314,1270,522],{"class":431},[314,1272,1273,1275,1277,1279,1281,1283,1285],{"class":316,"line":342},[314,1274,574],{"class":527},[314,1276,577],{"class":435},[314,1278,580],{"class":431},[314,1280,442],{"class":465},[314,1282,469],{"class":477},[314,1284,537],{"class":435},[314,1286,507],{"class":477},[314,1288,1289],{"class":316,"line":348},[314,1290,327],{"emptyLinePlaceholder":326},[314,1292,1293,1296],{"class":316,"line":354},[314,1294,1295],{"class":427},"    try",[314,1297,522],{"class":431},[314,1299,1300,1303,1306,1308,1310,1313,1315,1317],{"class":316,"line":360},[314,1301,1302],{"class":527},"      const",[314,1304,1305],{"class":435}," body",[314,1307,580],{"class":431},[314,1309,866],{"class":427},[314,1311,1312],{"class":435}," request",[314,1314,600],{"class":431},[314,1316,668],{"class":465},[314,1318,654],{"class":477},[314,1320,1321,1324,1326,1328,1330,1332,1335,1337,1339,1342,1344,1346,1348,1351,1353,1355],{"class":316,"line":366},[314,1322,1323],{"class":435},"      log",[314,1325,600],{"class":431},[314,1327,603],{"class":465},[314,1329,469],{"class":477},[314,1331,608],{"class":431},[314,1333,1334],{"class":477}," payment",[314,1336,481],{"class":431},[314,1338,432],{"class":431},[314,1340,1341],{"class":477}," amount",[314,1343,481],{"class":431},[314,1345,1305],{"class":435},[314,1347,600],{"class":431},[314,1349,1350],{"class":435},"amount",[314,1352,445],{"class":431},[314,1354,445],{"class":431},[314,1356,507],{"class":477},[314,1358,1359],{"class":316,"line":371},[314,1360,327],{"emptyLinePlaceholder":326},[314,1362,1363,1366,1369,1372,1374,1376,1379,1382,1385],{"class":316,"line":377},[314,1364,1365],{"class":427},"      if",[314,1367,1368],{"class":477}," (",[314,1370,1371],{"class":435},"body",[314,1373,600],{"class":431},[314,1375,1350],{"class":435},[314,1377,1378],{"class":431}," \u003C=",[314,1380,1381],{"class":1148}," 0",[314,1383,1384],{"class":477},") ",[314,1386,472],{"class":431},[314,1388,1389,1392,1394,1396],{"class":316,"line":627},[314,1390,1391],{"class":427},"        throw",[314,1393,1208],{"class":465},[314,1395,469],{"class":477},[314,1397,472],{"class":431},[314,1399,1400,1403,1405,1408],{"class":316,"line":632},[314,1401,1402],{"class":477},"          status",[314,1404,481],{"class":431},[314,1406,1407],{"class":1148}," 400",[314,1409,1410],{"class":431},",\n",[314,1412,1413,1416,1418,1420,1423,1425],{"class":316,"line":639},[314,1414,1415],{"class":477},"          message",[314,1417,481],{"class":431},[314,1419,451],{"class":431},[314,1421,1422],{"class":406},"Invalid payment amount",[314,1424,496],{"class":431},[314,1426,1410],{"class":431},[314,1428,1429,1432,1434,1436,1439,1441],{"class":316,"line":644},[314,1430,1431],{"class":477},"          why",[314,1433,481],{"class":431},[314,1435,451],{"class":431},[314,1437,1438],{"class":406},"The amount must be a positive number",[314,1440,496],{"class":431},[314,1442,1410],{"class":431},[314,1444,1445,1448,1450,1452,1455,1457],{"class":316,"line":657},[314,1446,1447],{"class":477},"          fix",[314,1449,481],{"class":431},[314,1451,451],{"class":431},[314,1453,1454],{"class":406},"Pass a positive integer in cents",[314,1456,496],{"class":431},[314,1458,1410],{"class":431},[314,1460,1461,1464],{"class":316,"line":688},[314,1462,1463],{"class":431},"        }",[314,1465,507],{"class":477},[314,1467,1468],{"class":316,"line":694},[314,1469,1470],{"class":431},"      }\n",[314,1472,1474],{"class":316,"line":1473},19,[314,1475,327],{"emptyLinePlaceholder":326},[314,1477,1479,1481,1483,1485],{"class":316,"line":1478},20,[314,1480,1323],{"class":435},[314,1482,600],{"class":431},[314,1484,651],{"class":465},[314,1486,654],{"class":477},[314,1488,1490,1493,1495,1497,1499,1501,1503,1506,1508,1510,1512],{"class":316,"line":1489},21,[314,1491,1492],{"class":427},"      return",[314,1494,663],{"class":435},[314,1496,600],{"class":431},[314,1498,668],{"class":465},[314,1500,469],{"class":477},[314,1502,608],{"class":431},[314,1504,1505],{"class":477}," success",[314,1507,481],{"class":431},[314,1509,681],{"class":680},[314,1511,445],{"class":431},[314,1513,507],{"class":477},[314,1515,1517,1520,1523,1525,1528,1530],{"class":316,"line":1516},22,[314,1518,1519],{"class":431},"    }",[314,1521,1522],{"class":427}," catch",[314,1524,1368],{"class":477},[314,1526,1527],{"class":435},"error",[314,1529,1384],{"class":477},[314,1531,472],{"class":431},[314,1533,1535,1537,1539,1541,1543,1545,1548,1551,1554,1557,1560,1562,1564,1566,1569,1571,1573],{"class":316,"line":1534},23,[314,1536,1323],{"class":435},[314,1538,600],{"class":431},[314,1540,1527],{"class":465},[314,1542,469],{"class":477},[314,1544,1527],{"class":435},[314,1546,1547],{"class":431}," instanceof",[314,1549,1550],{"class":402}," Error",[314,1552,1553],{"class":431}," ?",[314,1555,1556],{"class":435}," error",[314,1558,1559],{"class":431}," :",[314,1561,804],{"class":431},[314,1563,1550],{"class":465},[314,1565,469],{"class":477},[314,1567,1568],{"class":465},"String",[314,1570,469],{"class":477},[314,1572,1527],{"class":435},[314,1574,1575],{"class":477},")))\n",[314,1577,1579,1581,1583,1585],{"class":316,"line":1578},24,[314,1580,1323],{"class":435},[314,1582,600],{"class":431},[314,1584,651],{"class":465},[314,1586,654],{"class":477},[314,1588,1590],{"class":316,"line":1589},25,[314,1591,327],{"emptyLinePlaceholder":326},[314,1593,1595,1597,1600,1602,1604,1606,1608],{"class":316,"line":1594},26,[314,1596,1302],{"class":527},[314,1598,1599],{"class":435}," parsed",[314,1601,580],{"class":431},[314,1603,1213],{"class":465},[314,1605,469],{"class":477},[314,1607,1527],{"class":435},[314,1609,507],{"class":477},[314,1611,1613,1615,1617,1619,1621,1623],{"class":316,"line":1612},27,[314,1614,1492],{"class":427},[314,1616,663],{"class":435},[314,1618,600],{"class":431},[314,1620,668],{"class":465},[314,1622,469],{"class":477},[314,1624,472],{"class":431},[314,1626,1628,1631,1633,1635,1637,1640],{"class":316,"line":1627},28,[314,1629,1630],{"class":477},"        message",[314,1632,481],{"class":431},[314,1634,1599],{"class":435},[314,1636,600],{"class":431},[314,1638,1639],{"class":435},"message",[314,1641,1410],{"class":431},[314,1643,1645,1648,1650,1652,1654,1657],{"class":316,"line":1644},29,[314,1646,1647],{"class":477},"        why",[314,1649,481],{"class":431},[314,1651,1599],{"class":435},[314,1653,600],{"class":431},[314,1655,1656],{"class":435},"why",[314,1658,1410],{"class":431},[314,1660,1662,1665,1667,1669,1671,1674],{"class":316,"line":1661},30,[314,1663,1664],{"class":477},"        fix",[314,1666,481],{"class":431},[314,1668,1599],{"class":435},[314,1670,600],{"class":431},[314,1672,1673],{"class":435},"fix",[314,1675,1410],{"class":431},[314,1677,1679,1682,1684,1687,1689,1691,1693,1696,1698],{"class":316,"line":1678},31,[314,1680,1681],{"class":431},"      },",[314,1683,432],{"class":431},[314,1685,1686],{"class":477}," status",[314,1688,481],{"class":431},[314,1690,1599],{"class":435},[314,1692,600],{"class":431},[314,1694,1695],{"class":435},"status",[314,1697,445],{"class":431},[314,1699,507],{"class":477},[314,1701,1703],{"class":316,"line":1702},32,[314,1704,1705],{"class":431},"    }\n",[314,1707,1709],{"class":316,"line":1708},33,[314,1710,691],{"class":431},[314,1712,1714],{"class":316,"line":1713},34,[314,1715,697],{"class":431},[382,1717,76],{"id":1718},"configuration",[288,1720,1721,1722,1726,1727,1730],{},"See the ",[1723,1724,1725],"a",{"href":77},"Configuration reference"," for all available options (",[292,1728,1729],{},"initLogger",", middleware options, sampling, silent mode, etc.).",[382,1732,1734],{"id":1733},"drain-enrichers","Drain & Enrichers",[288,1736,1737,1738,1740],{},"Configure drain and enrichers via ",[292,1739,466],{}," options:",[304,1742,1744],{"className":417,"code":1743,"filename":419,"language":420,"meta":310,"style":310},"import { initWorkersLogger, createWorkersLogger } from 'evlog\u002Fworkers'\nimport { createAxiomDrain } from 'evlog\u002Faxiom'\nimport { createUserAgentEnricher } from 'evlog\u002Fenrichers'\nimport { createDrainPipeline } from 'evlog\u002Fpipeline'\nimport type { DrainContext } from 'evlog'\n\nconst pipeline = createDrainPipeline\u003CDrainContext>({\n  batch: { size: 50, intervalMs: 5000 },\n})\nconst drain = pipeline(createAxiomDrain())\nconst userAgent = createUserAgentEnricher()\n\ninitWorkersLogger({\n  env: { service: 'my-worker' },\n  drain,\n  enrich: (ctx) => {\n    userAgent(ctx)\n  },\n})\n",[292,1745,1746,1768,1788,1808,1828,1850,1854,1878,1907,1913,1933,1946,1950,1958,1978,1985,2004,2015,2019],{"__ignoreMap":310},[314,1747,1748,1750,1752,1754,1756,1758,1760,1762,1764,1766],{"class":316,"line":317},[314,1749,428],{"class":427},[314,1751,432],{"class":431},[314,1753,436],{"class":435},[314,1755,439],{"class":431},[314,1757,442],{"class":435},[314,1759,445],{"class":431},[314,1761,448],{"class":427},[314,1763,451],{"class":431},[314,1765,294],{"class":406},[314,1767,456],{"class":431},[314,1769,1770,1772,1774,1777,1779,1781,1783,1786],{"class":316,"line":323},[314,1771,428],{"class":427},[314,1773,432],{"class":431},[314,1775,1776],{"class":435}," createAxiomDrain",[314,1778,445],{"class":431},[314,1780,448],{"class":427},[314,1782,451],{"class":431},[314,1784,1785],{"class":406},"evlog\u002Faxiom",[314,1787,456],{"class":431},[314,1789,1790,1792,1794,1797,1799,1801,1803,1806],{"class":316,"line":330},[314,1791,428],{"class":427},[314,1793,432],{"class":431},[314,1795,1796],{"class":435}," createUserAgentEnricher",[314,1798,445],{"class":431},[314,1800,448],{"class":427},[314,1802,451],{"class":431},[314,1804,1805],{"class":406},"evlog\u002Fenrichers",[314,1807,456],{"class":431},[314,1809,1810,1812,1814,1817,1819,1821,1823,1826],{"class":316,"line":336},[314,1811,428],{"class":427},[314,1813,432],{"class":431},[314,1815,1816],{"class":435}," createDrainPipeline",[314,1818,445],{"class":431},[314,1820,448],{"class":427},[314,1822,451],{"class":431},[314,1824,1825],{"class":406},"evlog\u002Fpipeline",[314,1827,456],{"class":431},[314,1829,1830,1832,1835,1837,1840,1842,1844,1846,1848],{"class":316,"line":342},[314,1831,428],{"class":427},[314,1833,1834],{"class":427}," type",[314,1836,432],{"class":431},[314,1838,1839],{"class":435}," DrainContext",[314,1841,445],{"class":431},[314,1843,448],{"class":427},[314,1845,451],{"class":431},[314,1847,1222],{"class":406},[314,1849,456],{"class":431},[314,1851,1852],{"class":316,"line":348},[314,1853,327],{"emptyLinePlaceholder":326},[314,1855,1856,1859,1862,1865,1867,1869,1872,1874,1876],{"class":316,"line":354},[314,1857,1858],{"class":527},"const",[314,1860,1861],{"class":435}," pipeline ",[314,1863,1864],{"class":431},"=",[314,1866,1816],{"class":465},[314,1868,561],{"class":431},[314,1870,1871],{"class":402},"DrainContext",[314,1873,567],{"class":431},[314,1875,469],{"class":435},[314,1877,472],{"class":431},[314,1879,1880,1883,1885,1887,1890,1892,1895,1897,1900,1902,1905],{"class":316,"line":360},[314,1881,1882],{"class":477},"  batch",[314,1884,481],{"class":431},[314,1886,432],{"class":431},[314,1888,1889],{"class":477}," size",[314,1891,481],{"class":431},[314,1893,1894],{"class":1148}," 50",[314,1896,439],{"class":431},[314,1898,1899],{"class":477}," intervalMs",[314,1901,481],{"class":431},[314,1903,1904],{"class":1148}," 5000",[314,1906,499],{"class":431},[314,1908,1909,1911],{"class":316,"line":366},[314,1910,504],{"class":431},[314,1912,507],{"class":435},[314,1914,1915,1917,1920,1922,1925,1927,1930],{"class":316,"line":371},[314,1916,1858],{"class":527},[314,1918,1919],{"class":435}," drain ",[314,1921,1864],{"class":431},[314,1923,1924],{"class":465}," pipeline",[314,1926,469],{"class":435},[314,1928,1929],{"class":465},"createAxiomDrain",[314,1931,1932],{"class":435},"())\n",[314,1934,1935,1937,1940,1942,1944],{"class":316,"line":377},[314,1936,1858],{"class":527},[314,1938,1939],{"class":435}," userAgent ",[314,1941,1864],{"class":431},[314,1943,1796],{"class":465},[314,1945,654],{"class":435},[314,1947,1948],{"class":316,"line":627},[314,1949,327],{"emptyLinePlaceholder":326},[314,1951,1952,1954,1956],{"class":316,"line":632},[314,1953,466],{"class":465},[314,1955,469],{"class":435},[314,1957,472],{"class":431},[314,1959,1960,1962,1964,1966,1968,1970,1972,1974,1976],{"class":316,"line":639},[314,1961,478],{"class":477},[314,1963,481],{"class":431},[314,1965,432],{"class":431},[314,1967,486],{"class":477},[314,1969,481],{"class":431},[314,1971,451],{"class":431},[314,1973,493],{"class":406},[314,1975,496],{"class":431},[314,1977,499],{"class":431},[314,1979,1980,1983],{"class":316,"line":644},[314,1981,1982],{"class":435},"  drain",[314,1984,1410],{"class":431},[314,1986,1987,1990,1992,1994,1997,1999,2002],{"class":316,"line":657},[314,1988,1989],{"class":465},"  enrich",[314,1991,481],{"class":431},[314,1993,1368],{"class":431},[314,1995,1996],{"class":536},"ctx",[314,1998,890],{"class":431},[314,2000,2001],{"class":527}," =>",[314,2003,522],{"class":431},[314,2005,2006,2009,2011,2013],{"class":316,"line":688},[314,2007,2008],{"class":465},"    userAgent",[314,2010,469],{"class":477},[314,2012,1996],{"class":435},[314,2014,507],{"class":477},[314,2016,2017],{"class":316,"line":694},[314,2018,691],{"class":431},[314,2020,2021,2023],{"class":316,"line":1473},[314,2022,504],{"class":431},[314,2024,507],{"class":435},[717,2026,1721,2027,2029,2030,2032],{"color":719,"icon":13},[1723,2028,189],{"href":194}," and ",[1723,2031,253],{"href":258}," docs for all available drain adapters and enrichers.",[382,2034,2036],{"id":2035},"wrangler-configuration","Wrangler Configuration",[288,2038,2039],{},"Disable Cloudflare's default invocation logs to avoid duplicates when using evlog:",[304,2041,2046],{"className":2042,"code":2043,"filename":2044,"language":2045,"meta":310,"style":310},"language-toml shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","[observability]\nenabled = false\n","wrangler.toml","toml",[292,2047,2048,2053],{"__ignoreMap":310},[314,2049,2050],{"class":316,"line":317},[314,2051,2052],{},"[observability]\n",[314,2054,2055],{"class":316,"line":323},[314,2056,2057],{},"enabled = false\n",[382,2059,2061],{"id":2060},"run-locally","Run Locally",[304,2063,2065],{"className":392,"code":2064,"filename":394,"language":395,"meta":310,"style":310},"wrangler dev\n",[292,2066,2067],{"__ignoreMap":310},[314,2068,2069,2072],{"class":316,"line":317},[314,2070,2071],{"class":402},"wrangler",[314,2073,2074],{"class":406}," dev\n",[382,2076,2078],{"id":2077},"next-steps","Next Steps",[2080,2081,2082,2088,2093,2098],"ul",{},[2083,2084,2085,2087],"li",{},[1723,2086,46],{"href":47},": Design comprehensive events with context layering",[2083,2089,2090,2092],{},[1723,2091,189],{"href":194},": Send logs to Axiom, Sentry, PostHog, and more",[2083,2094,2095,2097],{},[1723,2096,81],{"href":82},": Control log volume with head and tail sampling",[2083,2099,2100,2102,2103,707,2105,711,2107,2110],{},[1723,2101,51],{"href":52},": Throw errors with ",[292,2104,1656],{},[292,2106,1673],{},[292,2108,2109],{},"link"," fields",[2112,2113,2114],"style",{},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}",{"title":310,"searchDepth":323,"depth":323,"links":2116},[2117,2121,2122,2123,2124,2125,2126,2127],{"id":384,"depth":323,"text":20,"children":2118},[2119,2120],{"id":388,"depth":330,"text":389},{"id":413,"depth":330,"text":414},{"id":726,"depth":323,"text":46},{"id":1186,"depth":323,"text":1187},{"id":1718,"depth":323,"text":76},{"id":1733,"depth":323,"text":1734},{"id":2035,"depth":323,"text":2036},{"id":2060,"depth":323,"text":2061},{"id":2077,"depth":323,"text":2078},"Wide events, structured errors, and logging in Cloudflare Workers and Durable Objects.","md",null,{},{"title":170,"icon":173},{"title":170,"description":2128},"0CMl_bgoDX0yF654QEd2tKTbE4DkKmYKX8YSGRenOJ4",[2136,2138],{"title":165,"path":166,"stem":167,"description":2137,"icon":168,"children":-1},"Automatic wide events, structured errors, drain adapters, enrichers, and tail sampling in React Router applications.",{"title":175,"path":176,"stem":177,"description":2139,"icon":89,"children":-1},"Use evlog in standalone TypeScript scripts, CLI tools, queues, cron jobs, and any TypeScript process.",1775319540424]