[{"data":1,"prerenderedAt":1251},["ShallowReactive",2],{"navigation_docs":3,"-logging-overview":301,"-logging-overview-surround":1246},[4,30,75,119,207,271,287],{"title":5,"path":6,"stem":7,"children":8,"page":29},"Getting Started","\u002Fgetting-started","1.getting-started",[9,14,19,24],{"title":10,"path":11,"stem":12,"icon":13},"Introduction","\u002Fgetting-started\u002Fintroduction","1.getting-started\u002F1.introduction","i-lucide-info",{"title":15,"path":16,"stem":17,"icon":18},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F2.installation","i-lucide-download",{"title":20,"path":21,"stem":22,"icon":23},"Quick Start","\u002Fgetting-started\u002Fquick-start","1.getting-started\u002F3.quick-start","i-lucide-zap",{"title":25,"path":26,"stem":27,"icon":28},"Agent Skills","\u002Fgetting-started\u002Fagent-skills","1.getting-started\u002F4.agent-skills","i-lucide-sparkles",false,{"title":31,"path":32,"stem":33,"children":34,"page":29},"Logging","\u002Flogging","2.logging",[35,40,45,50,55,60,65,70],{"title":36,"path":37,"stem":38,"icon":39},"Overview","\u002Flogging\u002Foverview","2.logging\u002F0.overview","i-lucide-list",{"title":41,"path":42,"stem":43,"icon":44},"Simple Logging","\u002Flogging\u002Fsimple-logging","2.logging\u002F1.simple-logging","i-lucide-terminal",{"title":46,"path":47,"stem":48,"icon":49},"Wide Events","\u002Flogging\u002Fwide-events","2.logging\u002F2.wide-events","i-lucide-layers",{"title":51,"path":52,"stem":53,"icon":54},"Structured Errors","\u002Flogging\u002Fstructured-errors","2.logging\u002F3.structured-errors","i-lucide-shield-alert",{"title":56,"path":57,"stem":58,"icon":59},"Client Logging","\u002Flogging\u002Fclient-logging","2.logging\u002F4.client-logging","i-lucide-monitor",{"title":61,"path":62,"stem":63,"icon":64},"AI SDK Integration","\u002Flogging\u002Fai-sdk","2.logging\u002F5.ai-sdk","i-simple-icons-vercel",{"title":66,"path":67,"stem":68,"icon":69},"Better Auth Integration","\u002Flogging\u002Fbetter-auth","2.logging\u002F6.better-auth","i-simple-icons-betterauth",{"title":71,"path":72,"stem":73,"icon":74},"Audit Logs","\u002Flogging\u002Faudit","2.logging\u002F7.audit","i-lucide-shield-check",{"title":76,"path":77,"stem":78,"children":79,"page":29},"Core Concepts","\u002Fcore-concepts","3.core-concepts",[80,85,90,95,100,104,109,114],{"title":81,"path":82,"stem":83,"icon":84},"Lifecycle","\u002Fcore-concepts\u002Flifecycle","3.core-concepts\u002F0.lifecycle","i-lucide-arrow-right-left",{"title":86,"path":87,"stem":88,"icon":89},"Configuration","\u002Fcore-concepts\u002Fconfiguration","3.core-concepts\u002F1.configuration","i-lucide-settings",{"title":91,"path":92,"stem":93,"icon":94},"Sampling","\u002Fcore-concepts\u002Fsampling","3.core-concepts\u002F2.sampling","i-lucide-filter",{"title":96,"path":97,"stem":98,"icon":99},"Typed Fields","\u002Fcore-concepts\u002Ftyped-fields","3.core-concepts\u002F3.typed-fields","i-simple-icons-typescript",{"title":101,"path":102,"stem":103,"icon":74},"Best Practices","\u002Fcore-concepts\u002Fbest-practices","3.core-concepts\u002F4.best-practices",{"title":105,"path":106,"stem":107,"icon":108},"Performance","\u002Fcore-concepts\u002Fperformance","3.core-concepts\u002F5.performance","i-lucide-gauge",{"title":110,"path":111,"stem":112,"icon":113},"Vite Plugin","\u002Fcore-concepts\u002Fvite-plugin","3.core-concepts\u002F6.vite-plugin","i-custom-vite",{"title":115,"path":116,"stem":117,"icon":118},"Auto-Redaction","\u002Fcore-concepts\u002Fredaction","3.core-concepts\u002F7.redaction","i-lucide-eye-off",{"title":120,"path":121,"stem":122,"children":123,"page":29},"Frameworks","\u002Fframeworks","4.frameworks",[124,128,133,138,143,148,153,158,163,168,173,178,183,188,192,197,202],{"title":36,"path":125,"stem":126,"icon":127},"\u002Fframeworks\u002Foverview","4.frameworks\u002F00.overview","i-lucide-layout-grid",{"title":129,"path":130,"stem":131,"icon":132},"Nuxt","\u002Fframeworks\u002Fnuxt","4.frameworks\u002F01.nuxt","i-simple-icons-nuxtdotjs",{"title":134,"path":135,"stem":136,"icon":137},"Next.js","\u002Fframeworks\u002Fnextjs","4.frameworks\u002F02.nextjs","i-simple-icons-nextdotjs",{"title":139,"path":140,"stem":141,"icon":142},"SvelteKit","\u002Fframeworks\u002Fsveltekit","4.frameworks\u002F03.sveltekit","i-simple-icons-svelte",{"title":144,"path":145,"stem":146,"icon":147},"Nitro","\u002Fframeworks\u002Fnitro","4.frameworks\u002F04.nitro","i-custom-nitro",{"title":149,"path":150,"stem":151,"icon":152},"TanStack Start","\u002Fframeworks\u002Ftanstack-start","4.frameworks\u002F05.tanstack-start","i-custom-tanstack",{"title":154,"path":155,"stem":156,"icon":157},"NestJS","\u002Fframeworks\u002Fnestjs","4.frameworks\u002F06.nestjs","i-simple-icons-nestjs",{"title":159,"path":160,"stem":161,"icon":162},"Express","\u002Fframeworks\u002Fexpress","4.frameworks\u002F07.express","i-simple-icons-express",{"title":164,"path":165,"stem":166,"icon":167},"Hono","\u002Fframeworks\u002Fhono","4.frameworks\u002F08.hono","i-simple-icons-hono",{"title":169,"path":170,"stem":171,"icon":172},"Fastify","\u002Fframeworks\u002Ffastify","4.frameworks\u002F09.fastify","i-simple-icons-fastify",{"title":174,"path":175,"stem":176,"icon":177},"Elysia","\u002Fframeworks\u002Felysia","4.frameworks\u002F10.elysia","i-custom-elysia",{"title":179,"path":180,"stem":181,"icon":182},"React Router","\u002Fframeworks\u002Freact-router","4.frameworks\u002F11.react-router","i-custom-reactrouter",{"title":184,"path":185,"stem":186,"icon":187},"Cloudflare Workers","\u002Fframeworks\u002Fcloudflare-workers","4.frameworks\u002F12.cloudflare-workers","i-simple-icons-cloudflare",{"title":189,"path":190,"stem":191,"icon":99},"Standalone","\u002Fframeworks\u002Fstandalone","4.frameworks\u002F13.standalone",{"title":193,"path":194,"stem":195,"icon":196},"Astro","\u002Fframeworks\u002Fastro","4.frameworks\u002F14.astro","i-simple-icons-astro",{"title":198,"path":199,"stem":200,"icon":201},"Custom Integration","\u002Fframeworks\u002Fcustom-integration","4.frameworks\u002F15.custom-integration","i-lucide-puzzle",{"title":203,"path":204,"stem":205,"icon":206},"AWS Lambda","\u002Fframeworks\u002Faws-lambda","4.frameworks\u002F16.aws-lambda","i-custom-lambda",{"title":208,"path":209,"stem":210,"children":211,"page":29},"Adapters","\u002Fadapters","5.adapters",[212,216,221,226,231,236,241,246,251,256,261,266],{"title":36,"path":213,"stem":214,"icon":215},"\u002Fadapters\u002Foverview","5.adapters\u002F1.overview","i-custom-plug",{"title":217,"path":218,"stem":219,"icon":220},"Custom Adapters","\u002Fadapters\u002Fcustom","5.adapters\u002F10.custom","i-lucide-code",{"title":222,"path":223,"stem":224,"icon":225},"Pipeline","\u002Fadapters\u002Fpipeline","5.adapters\u002F11.pipeline","i-lucide-workflow",{"title":227,"path":228,"stem":229,"icon":230},"HTTP","\u002Fadapters\u002Fhttp","5.adapters\u002F12.http","i-lucide-globe",{"title":232,"path":233,"stem":234,"icon":235},"Axiom","\u002Fadapters\u002Faxiom","5.adapters\u002F2.axiom","i-custom-axiom",{"title":237,"path":238,"stem":239,"icon":240},"OTLP","\u002Fadapters\u002Fotlp","5.adapters\u002F3.otlp","i-simple-icons-opentelemetry",{"title":242,"path":243,"stem":244,"icon":245},"PostHog","\u002Fadapters\u002Fposthog","5.adapters\u002F4.posthog","i-simple-icons-posthog",{"title":247,"path":248,"stem":249,"icon":250},"Sentry","\u002Fadapters\u002Fsentry","5.adapters\u002F5.sentry","i-simple-icons-sentry",{"title":252,"path":253,"stem":254,"icon":255},"Better Stack","\u002Fadapters\u002Fbetter-stack","5.adapters\u002F6.better-stack","i-simple-icons-betterstack",{"title":257,"path":258,"stem":259,"icon":260},"File System","\u002Fadapters\u002Ffs","5.adapters\u002F7.fs","i-lucide-hard-drive",{"title":262,"path":263,"stem":264,"icon":265},"Datadog","\u002Fadapters\u002Fdatadog","5.adapters\u002F8.datadog","i-simple-icons-datadog",{"title":267,"path":268,"stem":269,"icon":270},"HyperDX","\u002Fadapters\u002Fhyperdx","5.adapters\u002F9.hyperdx","i-custom-hyperdx",{"title":272,"path":273,"stem":274,"children":275,"page":29},"Enrichers","\u002Fenrichers","6.enrichers",[276,279,283],{"title":36,"path":277,"stem":278,"icon":28},"\u002Fenrichers\u002Foverview","6.enrichers\u002F1.overview",{"title":280,"path":281,"stem":282,"icon":201},"Built-in","\u002Fenrichers\u002Fbuilt-in","6.enrichers\u002F2.built-in",{"title":284,"path":285,"stem":286,"icon":220},"Custom","\u002Fenrichers\u002Fcustom","6.enrichers\u002F3.custom",{"title":288,"path":289,"stem":290,"children":291,"page":29},"NuxtHub","\u002Fnuxthub","7.nuxthub",[292,296],{"title":36,"path":293,"stem":294,"icon":295},"\u002Fnuxthub\u002Foverview","7.nuxthub\u002F1.overview","i-lucide-database",{"title":297,"path":298,"stem":299,"icon":300},"Retention","\u002Fnuxthub\u002Fretention","7.nuxthub\u002F2.retention","i-lucide-clock",{"id":302,"title":303,"body":304,"description":1236,"extension":1237,"links":1238,"meta":1242,"navigation":1243,"path":37,"seo":1244,"stem":38,"__hash__":1245},"docs\u002F2.logging\u002F0.overview.md","Logging Overview",{"type":305,"value":306,"toc":1223},"minimark",[307,311,316,351,355,364,367,510,521,524,790,808,812,819,975,994,998,1113,1129,1133,1136,1189,1193,1219],[308,309,310],"p",{},"evlog provides three logging APIs, each designed for a different context. You can use all three in the same project.",[312,313,315],"h2",{"id":314},"the-three-modes","The Three Modes",[317,318,319,343,346],"card-group",{},[320,321,323,324,328,329,332,333,332,336,332,339,342],"card",{"color":322,"icon":44,"title":41,"to":42},"neutral","Fire-and-forget structured logs. Replace ",[325,326,327],"code",{},"console.log",", consola, or pino with ",[325,330,331],{},"log.info",", ",[325,334,335],{},"log.error",[325,337,338],{},"log.warn",[325,340,341],{},"log.debug",".",[320,344,345],{"color":322,"icon":49,"title":46,"to":47},"Accumulate context over a unit of work (a script, job, queue task, or request) then emit a single comprehensive event.",[320,347,350],{"color":322,"icon":348,"title":349,"to":125},"i-lucide-git-branch","Request Logging","Auto-managed wide events scoped to HTTP requests. Framework middleware creates the logger and emits it for you.",[312,352,354],{"id":353},"quick-comparison","Quick Comparison",[356,357,359,360,363],"h3",{"id":358},"simple-logging-log","Simple Logging (",[325,361,362],{},"log",")",[308,365,366],{},"One event per call. No accumulation, no lifecycle management.",[368,369,375],"pre",{"className":370,"code":371,"filename":372,"language":373,"meta":374,"style":374},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { log } from 'evlog'\n\nlog.info('auth', 'User logged in')\nlog.error({ action: 'payment', error: 'card_declined', userId: 42 })\n","src\u002Findex.ts","typescript","",[325,376,377,410,417,452],{"__ignoreMap":374},[378,379,382,386,390,394,397,400,403,407],"span",{"class":380,"line":381},"line",1,[378,383,385],{"class":384},"s7zQu","import",[378,387,389],{"class":388},"sMK4o"," {",[378,391,393],{"class":392},"sTEyZ"," log",[378,395,396],{"class":388}," }",[378,398,399],{"class":384}," from",[378,401,402],{"class":388}," '",[378,404,406],{"class":405},"sfazB","evlog",[378,408,409],{"class":388},"'\n",[378,411,413],{"class":380,"line":412},2,[378,414,416],{"emptyLinePlaceholder":415},true,"\n",[378,418,420,422,424,428,431,434,437,439,442,444,447,449],{"class":380,"line":419},3,[378,421,362],{"class":392},[378,423,342],{"class":388},[378,425,427],{"class":426},"s2Zo4","info",[378,429,430],{"class":392},"(",[378,432,433],{"class":388},"'",[378,435,436],{"class":405},"auth",[378,438,433],{"class":388},[378,440,441],{"class":388},",",[378,443,402],{"class":388},[378,445,446],{"class":405},"User logged in",[378,448,433],{"class":388},[378,450,451],{"class":392},")\n",[378,453,455,457,459,462,464,467,471,474,476,479,481,483,486,488,490,493,495,497,500,502,506,508],{"class":380,"line":454},4,[378,456,362],{"class":392},[378,458,342],{"class":388},[378,460,461],{"class":426},"error",[378,463,430],{"class":392},[378,465,466],{"class":388},"{",[378,468,470],{"class":469},"swJcz"," action",[378,472,473],{"class":388},":",[378,475,402],{"class":388},[378,477,478],{"class":405},"payment",[378,480,433],{"class":388},[378,482,441],{"class":388},[378,484,485],{"class":469}," error",[378,487,473],{"class":388},[378,489,402],{"class":388},[378,491,492],{"class":405},"card_declined",[378,494,433],{"class":388},[378,496,441],{"class":388},[378,498,499],{"class":469}," userId",[378,501,473],{"class":388},[378,503,505],{"class":504},"sbssI"," 42",[378,507,396],{"class":388},[378,509,451],{"class":392},[356,511,513,514,517,518,363],{"id":512},"wide-events-createlogger-createrequestlogger","Wide Events (",[325,515,516],{},"createLogger"," \u002F ",[325,519,520],{},"createRequestLogger",[308,522,523],{},"One event per unit of work. Accumulate context progressively, emit when done.",[525,526,527,660],"code-group",{},[368,528,531],{"className":370,"code":529,"filename":530,"language":373,"meta":374,"style":374},"import { createLogger } from 'evlog'\n\nconst log = createLogger({ jobId: 'sync-001', queue: 'emails' })\nlog.set({ batch: { size: 50, processed: 50 } })\nlog.emit()\n","scripts\u002Fsync-job.ts",[325,532,533,552,556,604,647],{"__ignoreMap":374},[378,534,535,537,539,542,544,546,548,550],{"class":380,"line":381},[378,536,385],{"class":384},[378,538,389],{"class":388},[378,540,541],{"class":392}," createLogger",[378,543,396],{"class":388},[378,545,399],{"class":384},[378,547,402],{"class":388},[378,549,406],{"class":405},[378,551,409],{"class":388},[378,553,554],{"class":380,"line":412},[378,555,416],{"emptyLinePlaceholder":415},[378,557,558,562,565,568,570,572,574,577,579,581,584,586,588,591,593,595,598,600,602],{"class":380,"line":419},[378,559,561],{"class":560},"spNyl","const",[378,563,564],{"class":392}," log ",[378,566,567],{"class":388},"=",[378,569,541],{"class":426},[378,571,430],{"class":392},[378,573,466],{"class":388},[378,575,576],{"class":469}," jobId",[378,578,473],{"class":388},[378,580,402],{"class":388},[378,582,583],{"class":405},"sync-001",[378,585,433],{"class":388},[378,587,441],{"class":388},[378,589,590],{"class":469}," queue",[378,592,473],{"class":388},[378,594,402],{"class":388},[378,596,597],{"class":405},"emails",[378,599,433],{"class":388},[378,601,396],{"class":388},[378,603,451],{"class":392},[378,605,606,608,610,613,615,617,620,622,624,627,629,632,634,637,639,641,643,645],{"class":380,"line":454},[378,607,362],{"class":392},[378,609,342],{"class":388},[378,611,612],{"class":426},"set",[378,614,430],{"class":392},[378,616,466],{"class":388},[378,618,619],{"class":469}," batch",[378,621,473],{"class":388},[378,623,389],{"class":388},[378,625,626],{"class":469}," size",[378,628,473],{"class":388},[378,630,631],{"class":504}," 50",[378,633,441],{"class":388},[378,635,636],{"class":469}," processed",[378,638,473],{"class":388},[378,640,631],{"class":504},[378,642,396],{"class":388},[378,644,396],{"class":388},[378,646,451],{"class":392},[378,648,650,652,654,657],{"class":380,"line":649},5,[378,651,362],{"class":392},[378,653,342],{"class":388},[378,655,656],{"class":426},"emit",[378,658,659],{"class":392},"()\n",[368,661,664],{"className":370,"code":662,"filename":663,"language":373,"meta":374,"style":374},"import { createRequestLogger } from 'evlog'\n\nconst log = createRequestLogger({ method: 'POST', path: '\u002Fapi\u002Fcheckout' })\nlog.set({ user: { id: 1, plan: 'pro' } })\nlog.emit()\n","src\u002Fworker.ts",[325,665,666,685,689,733,780],{"__ignoreMap":374},[378,667,668,670,672,675,677,679,681,683],{"class":380,"line":381},[378,669,385],{"class":384},[378,671,389],{"class":388},[378,673,674],{"class":392}," createRequestLogger",[378,676,396],{"class":388},[378,678,399],{"class":384},[378,680,402],{"class":388},[378,682,406],{"class":405},[378,684,409],{"class":388},[378,686,687],{"class":380,"line":412},[378,688,416],{"emptyLinePlaceholder":415},[378,690,691,693,695,697,699,701,703,706,708,710,713,715,717,720,722,724,727,729,731],{"class":380,"line":419},[378,692,561],{"class":560},[378,694,564],{"class":392},[378,696,567],{"class":388},[378,698,674],{"class":426},[378,700,430],{"class":392},[378,702,466],{"class":388},[378,704,705],{"class":469}," method",[378,707,473],{"class":388},[378,709,402],{"class":388},[378,711,712],{"class":405},"POST",[378,714,433],{"class":388},[378,716,441],{"class":388},[378,718,719],{"class":469}," path",[378,721,473],{"class":388},[378,723,402],{"class":388},[378,725,726],{"class":405},"\u002Fapi\u002Fcheckout",[378,728,433],{"class":388},[378,730,396],{"class":388},[378,732,451],{"class":392},[378,734,735,737,739,741,743,745,748,750,752,755,757,760,762,765,767,769,772,774,776,778],{"class":380,"line":454},[378,736,362],{"class":392},[378,738,342],{"class":388},[378,740,612],{"class":426},[378,742,430],{"class":392},[378,744,466],{"class":388},[378,746,747],{"class":469}," user",[378,749,473],{"class":388},[378,751,389],{"class":388},[378,753,754],{"class":469}," id",[378,756,473],{"class":388},[378,758,759],{"class":504}," 1",[378,761,441],{"class":388},[378,763,764],{"class":469}," plan",[378,766,473],{"class":388},[378,768,402],{"class":388},[378,770,771],{"class":405},"pro",[378,773,433],{"class":388},[378,775,396],{"class":388},[378,777,396],{"class":388},[378,779,451],{"class":392},[378,781,782,784,786,788],{"class":380,"line":649},[378,783,362],{"class":392},[378,785,342],{"class":388},[378,787,656],{"class":426},[378,789,659],{"class":392},[308,791,792,794,795,797,798,332,801,804,805,342],{},[325,793,520],{}," is a thin wrapper around ",[325,796,516],{}," that pre-populates ",[325,799,800],{},"method",[325,802,803],{},"path",", and ",[325,806,807],{},"requestId",[356,809,811],{"id":810},"request-logging-framework-middleware","Request Logging (framework middleware)",[308,813,814,815,818],{},"Framework integrations create a wide event logger automatically on each request. ",[325,816,817],{},"useLogger(event)"," retrieves the logger that's already attached to the request context:",[368,820,823],{"className":370,"code":821,"filename":822,"language":373,"meta":374,"style":374},"import { useLogger } from 'evlog'\n\nexport default defineEventHandler(async (event) => {\n  const log = useLogger(event)\n  log.set({ user: { id: 1, plan: 'pro' } })\n  return { success: true }\n  \u002F\u002F auto-emitted on response end\n})\n","server\u002Fapi\u002Fcheckout.post.ts",[325,824,825,844,848,879,897,940,960,967],{"__ignoreMap":374},[378,826,827,829,831,834,836,838,840,842],{"class":380,"line":381},[378,828,385],{"class":384},[378,830,389],{"class":388},[378,832,833],{"class":392}," useLogger",[378,835,396],{"class":388},[378,837,399],{"class":384},[378,839,402],{"class":388},[378,841,406],{"class":405},[378,843,409],{"class":388},[378,845,846],{"class":380,"line":412},[378,847,416],{"emptyLinePlaceholder":415},[378,849,850,853,856,859,861,864,867,871,873,876],{"class":380,"line":419},[378,851,852],{"class":384},"export",[378,854,855],{"class":384}," default",[378,857,858],{"class":426}," defineEventHandler",[378,860,430],{"class":392},[378,862,863],{"class":560},"async",[378,865,866],{"class":388}," (",[378,868,870],{"class":869},"sHdIc","event",[378,872,363],{"class":388},[378,874,875],{"class":560}," =>",[378,877,878],{"class":388}," {\n",[378,880,881,884,886,889,891,893,895],{"class":380,"line":454},[378,882,883],{"class":560},"  const",[378,885,393],{"class":392},[378,887,888],{"class":388}," =",[378,890,833],{"class":426},[378,892,430],{"class":469},[378,894,870],{"class":392},[378,896,451],{"class":469},[378,898,899,902,904,906,908,910,912,914,916,918,920,922,924,926,928,930,932,934,936,938],{"class":380,"line":649},[378,900,901],{"class":392},"  log",[378,903,342],{"class":388},[378,905,612],{"class":426},[378,907,430],{"class":469},[378,909,466],{"class":388},[378,911,747],{"class":469},[378,913,473],{"class":388},[378,915,389],{"class":388},[378,917,754],{"class":469},[378,919,473],{"class":388},[378,921,759],{"class":504},[378,923,441],{"class":388},[378,925,764],{"class":469},[378,927,473],{"class":388},[378,929,402],{"class":388},[378,931,771],{"class":405},[378,933,433],{"class":388},[378,935,396],{"class":388},[378,937,396],{"class":388},[378,939,451],{"class":469},[378,941,943,946,948,951,953,957],{"class":380,"line":942},6,[378,944,945],{"class":384},"  return",[378,947,389],{"class":388},[378,949,950],{"class":469}," success",[378,952,473],{"class":388},[378,954,956],{"class":955},"sfNiH"," true",[378,958,959],{"class":388}," }\n",[378,961,963],{"class":380,"line":962},7,[378,964,966],{"class":965},"sHwdD","  \u002F\u002F auto-emitted on response end\n",[378,968,970,973],{"class":380,"line":969},8,[378,971,972],{"class":388},"}",[378,974,451],{"class":392},[976,977,978,980,981,332,984,332,987,990,991,993],"callout",{"color":427,"icon":13},[325,979,817],{}," doesn't create a logger, it retrieves the one the framework middleware already attached to the event. Each framework has its own way to access it (",[325,982,983],{},"useLogger",[325,985,986],{},"req.log",[325,988,989],{},"c.get('log')",", etc.). In Nuxt, ",[325,992,983],{}," is auto-imported.",[312,995,997],{"id":996},"when-to-use-what","When to Use What",[999,1000,1001,1023],"table",{},[1002,1003,1004],"thead",{},[1005,1006,1007,1010,1014,1020],"tr",{},[1008,1009],"th",{},[1008,1011,1012],{},[325,1013,362],{},[1008,1015,1016,517,1018],{},[325,1017,516],{},[325,1019,520],{},[1008,1021,1022],{},"Framework middleware",[1024,1025,1026,1044,1064,1083,1098],"tbody",{},[1005,1027,1028,1035,1038,1041],{},[1029,1030,1031],"td",{},[1032,1033,1034],"strong",{},"Use case",[1029,1036,1037],{},"Quick one-off events",[1029,1039,1040],{},"Scripts, jobs, workers, queues, HTTP without a framework",[1029,1042,1043],{},"API routes with a framework integration",[1005,1045,1046,1051,1054,1060],{},[1029,1047,1048],{},[1032,1049,1050],{},"Context",[1029,1052,1053],{},"Single call",[1029,1055,1056,1057],{},"Accumulate with ",[325,1058,1059],{},"set()",[1029,1061,1056,1062],{},[325,1063,1059],{},[1005,1065,1066,1071,1074,1080],{},[1029,1067,1068],{},[1032,1069,1070],{},"Emit",[1029,1072,1073],{},"Immediate",[1029,1075,1076,1077],{},"Manual ",[325,1078,1079],{},"emit()",[1029,1081,1082],{},"Automatic on response end",[1005,1084,1085,1089,1092,1095],{},[1029,1086,1087],{},[1032,1088,81],{},[1029,1090,1091],{},"None",[1029,1093,1094],{},"You manage it",[1029,1096,1097],{},"Framework manages it",[1005,1099,1100,1105,1108,1110],{},[1029,1101,1102],{},[1032,1103,1104],{},"Output",[1029,1106,1107],{},"Console + drain",[1029,1109,1107],{},[1029,1111,1112],{},"Console + drain + enrich",[976,1114,1116,1117,1119,1120,1122,1123,1125,1126,1128],{"color":427,"icon":1115},"i-lucide-lightbulb","Start with ",[325,1118,362],{}," for quick structured logging. When you need to accumulate context across an operation, switch to ",[325,1121,516],{}," (or ",[325,1124,520],{}," for HTTP contexts). When using a framework integration, the middleware handles everything, just call ",[325,1127,817],{}," to retrieve the logger.",[312,1130,1132],{"id":1131},"shared-features","Shared Features",[308,1134,1135],{},"All three modes share the same foundation:",[1137,1138,1139,1150,1156,1178,1183],"ul",{},[1140,1141,1142,1145,1146,1149],"li",{},[1032,1143,1144],{},"Pretty output"," in development, ",[1032,1147,1148],{},"JSON"," in production (default, no configuration needed)",[1140,1151,1152,1155],{},[1032,1153,1154],{},"Drain pipeline"," to send events to Axiom, Sentry, PostHog, and more",[1140,1157,1158,1161,1162,332,1165,804,1168,1171,1172,1177],{},[1032,1159,1160],{},"Structured errors"," with ",[325,1163,1164],{},"why",[325,1166,1167],{},"fix",[325,1169,1170],{},"link",", plus optional backend-only ",[1032,1173,1174],{},[325,1175,1176],{},"internal"," for logs",[1140,1179,1180,1182],{},[1032,1181,91],{}," to control log volume in production",[1140,1184,1185,1188],{},[1032,1186,1187],{},"Zero dependencies",", ~5 kB gzip",[312,1190,1192],{"id":1191},"next-steps","Next Steps",[1137,1194,1195,1204,1209,1214],{},[1140,1196,1197,1200,1201,1203],{},[1198,1199,41],"a",{"href":42},": The ",[325,1202,362],{}," API in detail",[1140,1205,1206,1208],{},[1198,1207,46],{"href":47},": Accumulating context and emitting events",[1140,1210,1211,1213],{},[1198,1212,51],{"href":52},": Errors with actionable context",[1140,1215,1216,1218],{},[1198,1217,120],{"href":125},": Auto-managed request logging per framework",[1220,1221,1222],"style",{},"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 .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}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 .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}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 .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 .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}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}",{"title":374,"searchDepth":412,"depth":412,"links":1224},[1225,1226,1233,1234,1235],{"id":314,"depth":412,"text":315},{"id":353,"depth":412,"text":354,"children":1227},[1228,1230,1232],{"id":358,"depth":419,"text":1229},"Simple Logging (log)",{"id":512,"depth":419,"text":1231},"Wide Events (createLogger \u002F createRequestLogger)",{"id":810,"depth":419,"text":811},{"id":996,"depth":412,"text":997},{"id":1131,"depth":412,"text":1132},{"id":1191,"depth":412,"text":1192},"evlog gives you three ways to log. Simple one-liners, wide events that accumulate context, and auto-managed request logging. Choose the right one for your use case.","md",[1239,1241],{"label":41,"icon":44,"to":42,"color":322,"variant":1240},"subtle",{"label":46,"icon":49,"to":47,"color":322,"variant":1240},{},{"title":36,"icon":39},{"title":303,"description":1236},"KgJzwu_Vh_FC3A_mfgdWL_rqOXZ2-wKc_1-0ZVkeBKE",[1247,1249],{"title":25,"path":26,"stem":27,"description":1248,"icon":28,"children":-1},"AI-assisted code review and evlog adoption using Agent Skills. Let AI review your logging patterns and guide migration to wide events.",{"title":41,"path":42,"stem":43,"description":1250,"icon":44,"children":-1},"Structured logging for everyday use. Replace console.log with log.info, log.error, log.warn, and log.debug. Fire-and-forget events with pretty output in dev and JSON in production.",1777047253693]