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