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