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