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