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