[{"data":1,"prerenderedAt":1220},["ShallowReactive",2],{"navigation_docs":3,"-logging-overview":276,"-logging-overview-surround":1215},[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":278,"body":279,"description":1205,"extension":1206,"links":1207,"meta":1211,"navigation":1212,"path":37,"seo":1213,"stem":38,"__hash__":1214},"docs\u002F2.logging\u002F0.overview.md","Logging Overview",{"type":280,"value":281,"toc":1192},"minimark",[282,286,291,326,330,339,342,485,496,499,765,783,787,794,950,969,973,1088,1104,1108,1111,1158,1162,1188],[283,284,285],"p",{},"evlog provides three logging APIs, each designed for a different context. You can use all three in the same project.",[287,288,290],"h2",{"id":289},"the-three-modes","The Three Modes",[292,293,294,318,321],"card-group",{},[295,296,298,299,303,304,307,308,307,311,307,314,317],"card",{"color":297,"icon":44,"title":41,"to":42},"neutral","Fire-and-forget structured logs. Replace ",[300,301,302],"code",{},"console.log",", consola, or pino with ",[300,305,306],{},"log.info",", ",[300,309,310],{},"log.error",[300,312,313],{},"log.warn",[300,315,316],{},"log.debug",".",[295,319,320],{"color":297,"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.",[295,322,325],{"color":297,"icon":323,"title":324,"to":111},"i-lucide-git-branch","Request Logging","Auto-managed wide events scoped to HTTP requests. Framework middleware creates the logger and emits it for you.",[287,327,329],{"id":328},"quick-comparison","Quick Comparison",[331,332,334,335,338],"h3",{"id":333},"simple-logging-log","Simple Logging (",[300,336,337],{},"log",")",[283,340,341],{},"One event per call. No accumulation, no lifecycle management.",[343,344,350],"pre",{"className":345,"code":346,"filename":347,"language":348,"meta":349,"style":349},"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","",[300,351,352,385,392,427],{"__ignoreMap":349},[353,354,357,361,365,369,372,375,378,382],"span",{"class":355,"line":356},"line",1,[353,358,360],{"class":359},"s7zQu","import",[353,362,364],{"class":363},"sMK4o"," {",[353,366,368],{"class":367},"sTEyZ"," log",[353,370,371],{"class":363}," }",[353,373,374],{"class":359}," from",[353,376,377],{"class":363}," '",[353,379,381],{"class":380},"sfazB","evlog",[353,383,384],{"class":363},"'\n",[353,386,388],{"class":355,"line":387},2,[353,389,391],{"emptyLinePlaceholder":390},true,"\n",[353,393,395,397,399,403,406,409,412,414,417,419,422,424],{"class":355,"line":394},3,[353,396,337],{"class":367},[353,398,317],{"class":363},[353,400,402],{"class":401},"s2Zo4","info",[353,404,405],{"class":367},"(",[353,407,408],{"class":363},"'",[353,410,411],{"class":380},"auth",[353,413,408],{"class":363},[353,415,416],{"class":363},",",[353,418,377],{"class":363},[353,420,421],{"class":380},"User logged in",[353,423,408],{"class":363},[353,425,426],{"class":367},")\n",[353,428,430,432,434,437,439,442,446,449,451,454,456,458,461,463,465,468,470,472,475,477,481,483],{"class":355,"line":429},4,[353,431,337],{"class":367},[353,433,317],{"class":363},[353,435,436],{"class":401},"error",[353,438,405],{"class":367},[353,440,441],{"class":363},"{",[353,443,445],{"class":444},"swJcz"," action",[353,447,448],{"class":363},":",[353,450,377],{"class":363},[353,452,453],{"class":380},"payment",[353,455,408],{"class":363},[353,457,416],{"class":363},[353,459,460],{"class":444}," error",[353,462,448],{"class":363},[353,464,377],{"class":363},[353,466,467],{"class":380},"card_declined",[353,469,408],{"class":363},[353,471,416],{"class":363},[353,473,474],{"class":444}," userId",[353,476,448],{"class":363},[353,478,480],{"class":479},"sbssI"," 42",[353,482,371],{"class":363},[353,484,426],{"class":367},[331,486,488,489,492,493,338],{"id":487},"wide-events-createlogger-createrequestlogger","Wide Events (",[300,490,491],{},"createLogger"," \u002F ",[300,494,495],{},"createRequestLogger",[283,497,498],{},"One event per unit of work. Accumulate context progressively, emit when done.",[500,501,502,635],"code-group",{},[343,503,506],{"className":345,"code":504,"filename":505,"language":348,"meta":349,"style":349},"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",[300,507,508,527,531,579,622],{"__ignoreMap":349},[353,509,510,512,514,517,519,521,523,525],{"class":355,"line":356},[353,511,360],{"class":359},[353,513,364],{"class":363},[353,515,516],{"class":367}," createLogger",[353,518,371],{"class":363},[353,520,374],{"class":359},[353,522,377],{"class":363},[353,524,381],{"class":380},[353,526,384],{"class":363},[353,528,529],{"class":355,"line":387},[353,530,391],{"emptyLinePlaceholder":390},[353,532,533,537,540,543,545,547,549,552,554,556,559,561,563,566,568,570,573,575,577],{"class":355,"line":394},[353,534,536],{"class":535},"spNyl","const",[353,538,539],{"class":367}," log ",[353,541,542],{"class":363},"=",[353,544,516],{"class":401},[353,546,405],{"class":367},[353,548,441],{"class":363},[353,550,551],{"class":444}," jobId",[353,553,448],{"class":363},[353,555,377],{"class":363},[353,557,558],{"class":380},"sync-001",[353,560,408],{"class":363},[353,562,416],{"class":363},[353,564,565],{"class":444}," queue",[353,567,448],{"class":363},[353,569,377],{"class":363},[353,571,572],{"class":380},"emails",[353,574,408],{"class":363},[353,576,371],{"class":363},[353,578,426],{"class":367},[353,580,581,583,585,588,590,592,595,597,599,602,604,607,609,612,614,616,618,620],{"class":355,"line":429},[353,582,337],{"class":367},[353,584,317],{"class":363},[353,586,587],{"class":401},"set",[353,589,405],{"class":367},[353,591,441],{"class":363},[353,593,594],{"class":444}," batch",[353,596,448],{"class":363},[353,598,364],{"class":363},[353,600,601],{"class":444}," size",[353,603,448],{"class":363},[353,605,606],{"class":479}," 50",[353,608,416],{"class":363},[353,610,611],{"class":444}," processed",[353,613,448],{"class":363},[353,615,606],{"class":479},[353,617,371],{"class":363},[353,619,371],{"class":363},[353,621,426],{"class":367},[353,623,625,627,629,632],{"class":355,"line":624},5,[353,626,337],{"class":367},[353,628,317],{"class":363},[353,630,631],{"class":401},"emit",[353,633,634],{"class":367},"()\n",[343,636,639],{"className":345,"code":637,"filename":638,"language":348,"meta":349,"style":349},"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",[300,640,641,660,664,708,755],{"__ignoreMap":349},[353,642,643,645,647,650,652,654,656,658],{"class":355,"line":356},[353,644,360],{"class":359},[353,646,364],{"class":363},[353,648,649],{"class":367}," createRequestLogger",[353,651,371],{"class":363},[353,653,374],{"class":359},[353,655,377],{"class":363},[353,657,381],{"class":380},[353,659,384],{"class":363},[353,661,662],{"class":355,"line":387},[353,663,391],{"emptyLinePlaceholder":390},[353,665,666,668,670,672,674,676,678,681,683,685,688,690,692,695,697,699,702,704,706],{"class":355,"line":394},[353,667,536],{"class":535},[353,669,539],{"class":367},[353,671,542],{"class":363},[353,673,649],{"class":401},[353,675,405],{"class":367},[353,677,441],{"class":363},[353,679,680],{"class":444}," method",[353,682,448],{"class":363},[353,684,377],{"class":363},[353,686,687],{"class":380},"POST",[353,689,408],{"class":363},[353,691,416],{"class":363},[353,693,694],{"class":444}," path",[353,696,448],{"class":363},[353,698,377],{"class":363},[353,700,701],{"class":380},"\u002Fapi\u002Fcheckout",[353,703,408],{"class":363},[353,705,371],{"class":363},[353,707,426],{"class":367},[353,709,710,712,714,716,718,720,723,725,727,730,732,735,737,740,742,744,747,749,751,753],{"class":355,"line":429},[353,711,337],{"class":367},[353,713,317],{"class":363},[353,715,587],{"class":401},[353,717,405],{"class":367},[353,719,441],{"class":363},[353,721,722],{"class":444}," user",[353,724,448],{"class":363},[353,726,364],{"class":363},[353,728,729],{"class":444}," id",[353,731,448],{"class":363},[353,733,734],{"class":479}," 1",[353,736,416],{"class":363},[353,738,739],{"class":444}," plan",[353,741,448],{"class":363},[353,743,377],{"class":363},[353,745,746],{"class":380},"pro",[353,748,408],{"class":363},[353,750,371],{"class":363},[353,752,371],{"class":363},[353,754,426],{"class":367},[353,756,757,759,761,763],{"class":355,"line":624},[353,758,337],{"class":367},[353,760,317],{"class":363},[353,762,631],{"class":401},[353,764,634],{"class":367},[283,766,767,769,770,772,773,307,776,779,780,317],{},[300,768,495],{}," is a thin wrapper around ",[300,771,491],{}," that pre-populates ",[300,774,775],{},"method",[300,777,778],{},"path",", and ",[300,781,782],{},"requestId",[331,784,786],{"id":785},"request-logging-framework-middleware","Request Logging (framework middleware)",[283,788,789,790,793],{},"Framework integrations create a wide event logger automatically on each request. ",[300,791,792],{},"useLogger(event)"," retrieves the logger that's already attached to the request context:",[343,795,798],{"className":345,"code":796,"filename":797,"language":348,"meta":349,"style":349},"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",[300,799,800,819,823,854,872,915,935,942],{"__ignoreMap":349},[353,801,802,804,806,809,811,813,815,817],{"class":355,"line":356},[353,803,360],{"class":359},[353,805,364],{"class":363},[353,807,808],{"class":367}," useLogger",[353,810,371],{"class":363},[353,812,374],{"class":359},[353,814,377],{"class":363},[353,816,381],{"class":380},[353,818,384],{"class":363},[353,820,821],{"class":355,"line":387},[353,822,391],{"emptyLinePlaceholder":390},[353,824,825,828,831,834,836,839,842,846,848,851],{"class":355,"line":394},[353,826,827],{"class":359},"export",[353,829,830],{"class":359}," default",[353,832,833],{"class":401}," defineEventHandler",[353,835,405],{"class":367},[353,837,838],{"class":535},"async",[353,840,841],{"class":363}," (",[353,843,845],{"class":844},"sHdIc","event",[353,847,338],{"class":363},[353,849,850],{"class":535}," =>",[353,852,853],{"class":363}," {\n",[353,855,856,859,861,864,866,868,870],{"class":355,"line":429},[353,857,858],{"class":535},"  const",[353,860,368],{"class":367},[353,862,863],{"class":363}," =",[353,865,808],{"class":401},[353,867,405],{"class":444},[353,869,845],{"class":367},[353,871,426],{"class":444},[353,873,874,877,879,881,883,885,887,889,891,893,895,897,899,901,903,905,907,909,911,913],{"class":355,"line":624},[353,875,876],{"class":367},"  log",[353,878,317],{"class":363},[353,880,587],{"class":401},[353,882,405],{"class":444},[353,884,441],{"class":363},[353,886,722],{"class":444},[353,888,448],{"class":363},[353,890,364],{"class":363},[353,892,729],{"class":444},[353,894,448],{"class":363},[353,896,734],{"class":479},[353,898,416],{"class":363},[353,900,739],{"class":444},[353,902,448],{"class":363},[353,904,377],{"class":363},[353,906,746],{"class":380},[353,908,408],{"class":363},[353,910,371],{"class":363},[353,912,371],{"class":363},[353,914,426],{"class":444},[353,916,918,921,923,926,928,932],{"class":355,"line":917},6,[353,919,920],{"class":359},"  return",[353,922,364],{"class":363},[353,924,925],{"class":444}," success",[353,927,448],{"class":363},[353,929,931],{"class":930},"sfNiH"," true",[353,933,934],{"class":363}," }\n",[353,936,938],{"class":355,"line":937},7,[353,939,941],{"class":940},"sHwdD","  \u002F\u002F auto-emitted on response end\n",[353,943,945,948],{"class":355,"line":944},8,[353,946,947],{"class":363},"}",[353,949,426],{"class":367},[951,952,953,955,956,307,959,307,962,965,966,968],"callout",{"color":402,"icon":13},[300,954,792],{}," 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 (",[300,957,958],{},"useLogger",[300,960,961],{},"req.log",[300,963,964],{},"c.get('log')",", etc.). In Nuxt, ",[300,967,958],{}," is auto-imported.",[287,970,972],{"id":971},"when-to-use-what","When to Use What",[974,975,976,998],"table",{},[977,978,979],"thead",{},[980,981,982,985,989,995],"tr",{},[983,984],"th",{},[983,986,987],{},[300,988,337],{},[983,990,991,492,993],{},[300,992,491],{},[300,994,495],{},[983,996,997],{},"Framework middleware",[999,1000,1001,1019,1039,1058,1073],"tbody",{},[980,1002,1003,1010,1013,1016],{},[1004,1005,1006],"td",{},[1007,1008,1009],"strong",{},"Use case",[1004,1011,1012],{},"Quick one-off events",[1004,1014,1015],{},"Scripts, jobs, workers, queues, HTTP without a framework",[1004,1017,1018],{},"API routes with a framework integration",[980,1020,1021,1026,1029,1035],{},[1004,1022,1023],{},[1007,1024,1025],{},"Context",[1004,1027,1028],{},"Single call",[1004,1030,1031,1032],{},"Accumulate with ",[300,1033,1034],{},"set()",[1004,1036,1031,1037],{},[300,1038,1034],{},[980,1040,1041,1046,1049,1055],{},[1004,1042,1043],{},[1007,1044,1045],{},"Emit",[1004,1047,1048],{},"Immediate",[1004,1050,1051,1052],{},"Manual ",[300,1053,1054],{},"emit()",[1004,1056,1057],{},"Automatic on response end",[980,1059,1060,1064,1067,1070],{},[1004,1061,1062],{},[1007,1063,71],{},[1004,1065,1066],{},"None",[1004,1068,1069],{},"You manage it",[1004,1071,1072],{},"Framework manages it",[980,1074,1075,1080,1083,1085],{},[1004,1076,1077],{},[1007,1078,1079],{},"Output",[1004,1081,1082],{},"Console + drain",[1004,1084,1082],{},[1004,1086,1087],{},"Console + drain + enrich",[951,1089,1091,1092,1094,1095,1097,1098,1100,1101,1103],{"color":402,"icon":1090},"i-lucide-lightbulb","Start with ",[300,1093,337],{}," for quick structured logging. When you need to accumulate context across an operation, switch to ",[300,1096,491],{}," (or ",[300,1099,495],{}," for HTTP contexts). When using a framework integration, the middleware handles everything, just call ",[300,1102,792],{}," to retrieve the logger.",[287,1105,1107],{"id":1106},"shared-features","Shared Features",[283,1109,1110],{},"All three modes share the same foundation:",[1112,1113,1114,1125,1131,1147,1152],"ul",{},[1115,1116,1117,1120,1121,1124],"li",{},[1007,1118,1119],{},"Pretty output"," in development, ",[1007,1122,1123],{},"JSON"," in production (default, no configuration needed)",[1115,1126,1127,1130],{},[1007,1128,1129],{},"Drain pipeline"," to send events to Axiom, Sentry, PostHog, and more",[1115,1132,1133,1136,1137,307,1140,779,1143,1146],{},[1007,1134,1135],{},"Structured errors"," with ",[300,1138,1139],{},"why",[300,1141,1142],{},"fix",[300,1144,1145],{},"link"," fields",[1115,1148,1149,1151],{},[1007,1150,81],{}," to control log volume in production",[1115,1153,1154,1157],{},[1007,1155,1156],{},"Zero dependencies",", ~5 kB gzip",[287,1159,1161],{"id":1160},"next-steps","Next Steps",[1112,1163,1164,1173,1178,1183],{},[1115,1165,1166,1169,1170,1172],{},[1167,1168,41],"a",{"href":42},": The ",[300,1171,337],{}," API in detail",[1115,1174,1175,1177],{},[1167,1176,46],{"href":47},": Accumulating context and emitting events",[1115,1179,1180,1182],{},[1167,1181,51],{"href":52},": Errors with actionable context",[1115,1184,1185,1187],{},[1167,1186,106],{"href":111},": Auto-managed request logging per framework",[1189,1190,1191],"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":349,"searchDepth":387,"depth":387,"links":1193},[1194,1195,1202,1203,1204],{"id":289,"depth":387,"text":290},{"id":328,"depth":387,"text":329,"children":1196},[1197,1199,1201],{"id":333,"depth":394,"text":1198},"Simple Logging (log)",{"id":487,"depth":394,"text":1200},"Wide Events (createLogger \u002F createRequestLogger)",{"id":785,"depth":394,"text":786},{"id":971,"depth":387,"text":972},{"id":1106,"depth":387,"text":1107},{"id":1160,"depth":387,"text":1161},"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",[1208,1210],{"label":41,"icon":44,"to":42,"color":297,"variant":1209},"subtle",{"label":46,"icon":49,"to":47,"color":297,"variant":1209},{},{"title":36,"icon":39},{"title":278,"description":1205},"EC8GG_jwWVH75euHkdHUM8t_pKRn_WUI4TgKvm6ITk8",[1216,1218],{"title":25,"path":26,"stem":27,"description":1217,"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":1219,"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.",1775288551549]