[{"data":1,"prerenderedAt":1294},["ShallowReactive",2],{"navigation_docs_en":3,"-en-logx-overview":448,"-en-logx-overview-surround":1289},[4,45,120,157,173,203,233,259,271,287,307,326,339,356,373,386,398,425],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":44},"Getting Started","i-lucide-rocket","\u002Fen\u002Fgetting-started","en\u002F01.getting-started",[10,15,20,25,30,35,40],{"title":11,"path":12,"stem":13,"icon":14},"Introduction","\u002Fen\u002Fgetting-started\u002Fintroduction","en\u002F01.getting-started\u002F1.introduction","i-lucide-house",{"title":16,"path":17,"stem":18,"icon":19},"Installation","\u002Fen\u002Fgetting-started\u002Finstallation","en\u002F01.getting-started\u002F2.installation","i-lucide-download",{"title":21,"path":22,"stem":23,"icon":24},"Your first module","\u002Fen\u002Fgetting-started\u002Ffirst-module","en\u002F01.getting-started\u002F3.first-module","i-lucide-package-plus",{"title":26,"path":27,"stem":28,"icon":29},"Project structure","\u002Fen\u002Fgetting-started\u002Fproject-structure","en\u002F01.getting-started\u002F4.project-structure","i-lucide-folder-tree",{"title":31,"path":32,"stem":33,"icon":34},"The shop sample application","\u002Fen\u002Fgetting-started\u002Fsample-app","en\u002F01.getting-started\u002F5.sample-app","i-lucide-shopping-cart",{"title":36,"path":37,"stem":38,"icon":39},"Coming from Laravel","\u002Fen\u002Fgetting-started\u002Fcoming-from-laravel","en\u002F01.getting-started\u002F6.coming-from-laravel","i-lucide-arrow-right-left",{"title":41,"path":42,"stem":43,"icon":39},"Coming from Symfony","\u002Fen\u002Fgetting-started\u002Fcoming-from-symfony","en\u002F01.getting-started\u002F7.coming-from-symfony",false,{"title":46,"icon":47,"path":48,"stem":49,"children":50,"page":44},"CLI Reference","i-lucide-terminal","\u002Fen\u002Fcli","en\u002F02.cli",[51,55,60,65,70,75,80,85,90,95,100,105,110,115],{"title":52,"path":53,"stem":54,"icon":47},"Overview","\u002Fen\u002Fcli\u002Foverview","en\u002F02.cli\u002F1.overview",{"title":56,"path":57,"stem":58,"icon":59},"add compose \u002F add docker","\u002Fen\u002Fcli\u002Fadd-compose","en\u002F02.cli\u002F10.add-compose","i-lucide-container",{"title":61,"path":62,"stem":63,"icon":64},"add mail","\u002Fen\u002Fcli\u002Fadd-mail","en\u002F02.cli\u002F11.add-mail","i-lucide-mail-plus",{"title":66,"path":67,"stem":68,"icon":69},"add notification","\u002Fen\u002Fcli\u002Fadd-notification","en\u002F02.cli\u002F12.add-notification","i-lucide-bell-plus",{"title":71,"path":72,"stem":73,"icon":74},"add realtime","\u002Fen\u002Fcli\u002Fadd-realtime","en\u002F02.cli\u002F13.add-realtime","i-lucide-radio-tower",{"title":76,"path":77,"stem":78,"icon":79},"add seeder","\u002Fen\u002Fcli\u002Fadd-seeder","en\u002F02.cli\u002F14.add-seeder","i-lucide-sprout",{"title":81,"path":82,"stem":83,"icon":84},"new project","\u002Fen\u002Fcli\u002Fnew-project","en\u002F02.cli\u002F2.new-project","i-lucide-folder-plus",{"title":86,"path":87,"stem":88,"icon":89},"new module","\u002Fen\u002Fcli\u002Fnew-module","en\u002F02.cli\u002F3.new-module","i-lucide-blocks",{"title":91,"path":92,"stem":93,"icon":94},"add surface","\u002Fen\u002Fcli\u002Fadd-surface","en\u002F02.cli\u002F4.add-surface","i-lucide-layers-2",{"title":96,"path":97,"stem":98,"icon":99},"add domain","\u002Fen\u002Fcli\u002Fadd-domain","en\u002F02.cli\u002F5.add-domain","i-lucide-box",{"title":101,"path":102,"stem":103,"icon":104},"add handler","\u002Fen\u002Fcli\u002Fadd-handler","en\u002F02.cli\u002F6.add-handler","i-lucide-webhook",{"title":106,"path":107,"stem":108,"icon":109},"new migration","\u002Fen\u002Fcli\u002Fnew-migration","en\u002F02.cli\u002F7.new-migration","i-lucide-file-plus",{"title":111,"path":112,"stem":113,"icon":114},"worker generators","\u002Fen\u002Fcli\u002Fworker-generators","en\u002F02.cli\u002F8.worker-generators","i-lucide-cog",{"title":116,"path":117,"stem":118,"icon":119},"add db","\u002Fen\u002Fcli\u002Fadd-db","en\u002F02.cli\u002F9.add-db","i-lucide-database-zap",{"title":121,"icon":99,"path":122,"stem":123,"children":124,"page":44},"Framework","\u002Fen\u002Fframework","en\u002F03.framework",[125,128,133,138,142,147,152],{"title":52,"path":126,"stem":127,"icon":99},"\u002Fen\u002Fframework\u002Foverview","en\u002F03.framework\u002F1.overview",{"title":129,"path":130,"stem":131,"icon":132},"Application lifecycle","\u002Fen\u002Fframework\u002Fapp","en\u002F03.framework\u002F2.app","i-lucide-power",{"title":134,"path":135,"stem":136,"icon":137},"Server","\u002Fen\u002Fframework\u002Fserver","en\u002F03.framework\u002F3.server","i-lucide-server",{"title":139,"path":140,"stem":141,"icon":114},"Worker","\u002Fen\u002Fframework\u002Fworker","en\u002F03.framework\u002F4.worker",{"title":143,"path":144,"stem":145,"icon":146},"Realtime","\u002Fen\u002Fframework\u002Frealtime","en\u002F03.framework\u002F5.realtime","i-lucide-radio",{"title":148,"path":149,"stem":150,"icon":151},"Migrations","\u002Fen\u002Fframework\u002Fmigrations","en\u002F03.framework\u002F6.migrations","i-lucide-file-stack",{"title":153,"path":154,"stem":155,"icon":156},"Social login","\u002Fen\u002Fframework\u002Fsocial-login","en\u002F03.framework\u002F7.social-login","i-lucide-log-in",{"title":158,"icon":159,"path":160,"stem":161,"children":162,"page":44},"Reference","i-lucide-book-open","\u002Fen\u002Freference","en\u002F04.reference",[163,168],{"title":164,"path":165,"stem":166,"icon":167},"Configuration","\u002Fen\u002Freference\u002Fconfiguration","en\u002F04.reference\u002F1.configuration","i-lucide-settings",{"title":169,"path":170,"stem":171,"icon":172},"External dependencies","\u002Fen\u002Freference\u002Fdependencies","en\u002F04.reference\u002F2.dependencies","i-lucide-package",{"title":174,"icon":175,"path":176,"stem":177,"children":178,"page":44},"Concepts","i-lucide-lightbulb","\u002Fen\u002Fconcepts","en\u002F05.concepts",[179,184,189,193,198],{"title":180,"path":181,"stem":182,"icon":183},"Architecture","\u002Fen\u002Fconcepts\u002Farchitecture","en\u002F05.concepts\u002F1.architecture","i-lucide-layers",{"title":185,"path":186,"stem":187,"icon":188},"Error model","\u002Fen\u002Fconcepts\u002Ferror-model","en\u002F05.concepts\u002F2.error-model","i-lucide-shield-alert",{"title":164,"path":190,"stem":191,"icon":192},"\u002Fen\u002Fconcepts\u002Fconfiguration","en\u002F05.concepts\u002F3.configuration","i-lucide-settings-2",{"title":194,"path":195,"stem":196,"icon":197},"Codegen pipeline","\u002Fen\u002Fconcepts\u002Fcodegen-pipeline","en\u002F05.concepts\u002F4.codegen-pipeline","i-lucide-file-json",{"title":199,"path":200,"stem":201,"icon":202},"Design patterns","\u002Fen\u002Fconcepts\u002Fdesign-patterns","en\u002F05.concepts\u002F5.design-patterns","i-lucide-puzzle",{"title":204,"icon":205,"path":206,"stem":207,"children":208,"page":44},"auth","i-lucide-shield-check","\u002Fen\u002Fauth","en\u002F06.auth",[209,214,219,224,229],{"title":210,"path":211,"stem":212,"icon":213},"Authentication","\u002Fen\u002Fauth\u002Foverview","en\u002F06.auth\u002F1.overview","i-lucide-key-round",{"title":215,"path":216,"stem":217,"icon":218},"RBAC","\u002Fen\u002Fauth\u002Frbac","en\u002F06.auth\u002F2.rbac","i-lucide-users",{"title":220,"path":221,"stem":222,"icon":223},"Policies","\u002Fen\u002Fauth\u002Fpolicy","en\u002F06.auth\u002F3.policy","i-lucide-gavel",{"title":225,"path":226,"stem":227,"icon":228},"Using auth standalone","\u002Fen\u002Fauth\u002Fstandalone","en\u002F06.auth\u002F4.standalone","i-lucide-plug",{"title":230,"path":231,"stem":232,"icon":156},"Social login with goth, standalone","\u002Fen\u002Fauth\u002Fsocial-standalone","en\u002F06.auth\u002F5.social-standalone",{"title":234,"icon":235,"path":236,"stem":237,"children":238,"page":44},"dbx","i-lucide-database","\u002Fen\u002Fdbx","en\u002F07.dbx",[239,242,246,250,255],{"title":52,"path":240,"stem":241,"icon":235},"\u002Fen\u002Fdbx\u002Foverview","en\u002F07.dbx\u002F1.overview",{"title":243,"path":244,"stem":245,"icon":228},"pgx","\u002Fen\u002Fdbx\u002Fpg","en\u002F07.dbx\u002F2.pg",{"title":247,"path":248,"stem":249,"icon":183},"bun","\u002Fen\u002Fdbx\u002Fbunx","en\u002F07.dbx\u002F3.bunx",{"title":251,"path":252,"stem":253,"icon":254},"Transactions","\u002Fen\u002Fdbx\u002Ftransactions","en\u002F07.dbx\u002F4.transactions","i-lucide-git-merge",{"title":256,"path":257,"stem":258,"icon":79},"Seeders","\u002Fen\u002Fdbx\u002Fseed","en\u002F07.dbx\u002F5.seed",{"title":260,"icon":192,"path":261,"stem":262,"children":263,"page":44},"envconf","\u002Fen\u002Fenvconf","en\u002F08.envconf",[264,267],{"title":52,"path":265,"stem":266,"icon":192},"\u002Fen\u002Fenvconf\u002Foverview","en\u002F08.envconf\u002F1.overview",{"title":268,"path":269,"stem":270,"icon":192},"Recipes","\u002Fen\u002Fenvconf\u002Frecipes","en\u002F08.envconf\u002F2.recipes",{"title":272,"icon":188,"path":273,"stem":274,"children":275,"page":44},"errs","\u002Fen\u002Ferrs","en\u002F09.errs",[276,279,283],{"title":52,"path":277,"stem":278,"icon":188},"\u002Fen\u002Ferrs\u002Foverview","en\u002F09.errs\u002F1.overview",{"title":280,"path":281,"stem":282,"icon":188},"API","\u002Fen\u002Ferrs\u002Fapi","en\u002F09.errs\u002F2.api",{"title":284,"path":285,"stem":286,"icon":188},"Integration","\u002Fen\u002Ferrs\u002Fintegration","en\u002F09.errs\u002F3.integration",{"title":288,"icon":289,"path":290,"stem":291,"children":292,"page":44},"events","i-lucide-workflow","\u002Fen\u002Fevents","en\u002F10.events",[293,297,302],{"title":294,"path":295,"stem":296,"icon":146},"Events","\u002Fen\u002Fevents\u002Foverview","en\u002F10.events\u002F1.overview",{"title":298,"path":299,"stem":300,"icon":301},"Outbox","\u002Fen\u002Fevents\u002Foutbox","en\u002F10.events\u002F2.outbox","i-lucide-inbox",{"title":303,"path":304,"stem":305,"icon":306},"Scheduling","\u002Fen\u002Fevents\u002Fscheduler","en\u002F10.events\u002F3.scheduler","i-lucide-calendar-clock",{"title":308,"icon":309,"path":310,"stem":311,"children":312,"page":44},"httperr","i-lucide-globe","\u002Fen\u002Fhttperr","en\u002F11.httperr",[313,316,321],{"title":52,"path":314,"stem":315,"icon":309},"\u002Fen\u002Fhttperr\u002Foverview","en\u002F11.httperr\u002F1.overview",{"title":317,"path":318,"stem":319,"icon":320},"Error responses","\u002Fen\u002Fhttperr\u002Ferror-responses","en\u002F11.httperr\u002F2.error-responses","i-lucide-octagon-alert",{"title":322,"path":323,"stem":324,"icon":325},"Validation","\u002Fen\u002Fhttperr\u002Fvalidation","en\u002F11.httperr\u002F3.validation","i-lucide-badge-check",{"title":327,"icon":328,"path":329,"stem":330,"children":331,"page":44},"logx","i-lucide-scroll-text","\u002Fen\u002Flogx","en\u002F12.logx",[332,335],{"title":52,"path":333,"stem":334,"icon":328},"\u002Fen\u002Flogx\u002Foverview","en\u002F12.logx\u002F1.overview",{"title":336,"path":337,"stem":338,"icon":47},"Monolog formatter","\u002Fen\u002Flogx\u002Fmonolog","en\u002F12.logx\u002F2.monolog",{"title":340,"icon":341,"path":342,"stem":343,"children":344,"page":44},"mail","i-lucide-mail","\u002Fen\u002Fmail","en\u002F13.mail",[345,348,352],{"title":52,"path":346,"stem":347,"icon":341},"\u002Fen\u002Fmail\u002Foverview","en\u002F13.mail\u002F1.overview",{"title":349,"path":350,"stem":351,"icon":341},"SMTP","\u002Fen\u002Fmail\u002Fsmtp","en\u002F13.mail\u002F2.smtp",{"title":353,"path":354,"stem":355,"icon":341},"MJML","\u002Fen\u002Fmail\u002Fmjml","en\u002F13.mail\u002F3.mjml",{"title":357,"icon":358,"path":359,"stem":360,"children":361,"page":44},"notify","i-lucide-bell","\u002Fen\u002Fnotify","en\u002F14.notify",[362,365,369],{"title":52,"path":363,"stem":364,"icon":358},"\u002Fen\u002Fnotify\u002Foverview","en\u002F14.notify\u002F1.overview",{"title":366,"path":367,"stem":368,"icon":358},"Database channel","\u002Fen\u002Fnotify\u002Fdatabase","en\u002F14.notify\u002F2.database",{"title":370,"path":371,"stem":372,"icon":358},"Broadcast channel","\u002Fen\u002Fnotify\u002Fbroadcast","en\u002F14.notify\u002F3.broadcast",{"title":374,"icon":375,"path":376,"stem":377,"children":378,"page":44},"paginate","i-lucide-list-ordered","\u002Fen\u002Fpaginate","en\u002F15.paginate",[379,382],{"title":52,"path":380,"stem":381,"icon":375},"\u002Fen\u002Fpaginate\u002Foverview","en\u002F15.paginate\u002F1.overview",{"title":383,"path":384,"stem":385,"icon":39},"Cursor pagination","\u002Fen\u002Fpaginate\u002Fcursor","en\u002F15.paginate\u002F2.cursor",{"title":387,"icon":183,"path":388,"stem":389,"children":390,"page":44},"queue","\u002Fen\u002Fqueue","en\u002F16.queue",[391,394],{"title":52,"path":392,"stem":393,"icon":375},"\u002Fen\u002Fqueue\u002Foverview","en\u002F16.queue\u002F1.overview",{"title":395,"path":396,"stem":397,"icon":183},"Tasks","\u002Fen\u002Fqueue\u002Ftasks","en\u002F16.queue\u002F2.tasks",{"title":399,"icon":400,"path":401,"stem":402,"children":403,"page":44},"storage","i-lucide-hard-drive","\u002Fen\u002Fstorage","en\u002F17.storage",[404,407,411,415,420],{"title":52,"path":405,"stem":406,"icon":400},"\u002Fen\u002Fstorage\u002Foverview","en\u002F17.storage\u002F1.overview",{"title":408,"path":409,"stem":410,"icon":400},"Disk API","\u002Fen\u002Fstorage\u002Fdisk-api","en\u002F17.storage\u002F2.disk-api",{"title":412,"path":413,"stem":414,"icon":400},"Memory and local disk","\u002Fen\u002Fstorage\u002Flocal","en\u002F17.storage\u002F3.local",{"title":416,"path":417,"stem":418,"icon":419},"S3","\u002Fen\u002Fstorage\u002Fs3","en\u002F17.storage\u002F4.s3","i-lucide-cloud",{"title":421,"path":422,"stem":423,"icon":424},"Testing","\u002Fen\u002Fstorage\u002Ftesting","en\u002F17.storage\u002F5.testing","i-lucide-flask-conical",{"title":426,"icon":427,"path":428,"stem":429,"children":430,"page":44},"telemetry","i-lucide-activity","\u002Fen\u002Ftelemetry","en\u002F18.telemetry",[431,434,438,443],{"title":52,"path":432,"stem":433,"icon":427},"\u002Fen\u002Ftelemetry\u002Foverview","en\u002F18.telemetry\u002F1.overview",{"title":435,"path":436,"stem":437,"icon":328},"Logging","\u002Fen\u002Ftelemetry\u002Flogging","en\u002F18.telemetry\u002F2.logging",{"title":439,"path":440,"stem":441,"icon":442},"OpenTelemetry","\u002Fen\u002Ftelemetry\u002Fopentelemetry","en\u002F18.telemetry\u002F3.opentelemetry","i-lucide-radar",{"title":444,"path":445,"stem":446,"icon":447},"Sentry","\u002Fen\u002Ftelemetry\u002Fsentry","en\u002F18.telemetry\u002F4.sentry","i-lucide-bug",{"id":449,"title":52,"body":450,"description":1282,"extension":1283,"links":1284,"meta":1285,"navigation":1286,"path":333,"seo":1287,"stem":334,"__hash__":1288},"docs_en\u002Fen\u002F12.logx\u002F1.overview.md",{"type":451,"value":452,"toc":1275},"minimark",[453,500,521,557,562,591,645,648,662,730,740,744,750,894,906,910,916,1219,1229,1233,1271],[454,455,456,459,460,463,464,467,468,471,472,475,476,475,479,482,483,486,487,489,490,493,494,499],"p",{},[457,458,327],"code",{}," is a standalone Go module (",[457,461,462],{},"github.com\u002Fgp-system\u002Flogx",", +",[457,465,466],{},"logx\u002Fmonolog","): a small toolkit for composing the default ",[457,469,470],{},"log\u002Fslog"," logger. Three combinators (",[457,473,474],{},"ConsoleHandler",", ",[457,477,478],{},"LevelFilter",[457,480,481],{},"Fanout",") give you a console format switch, a minimum-level gate and a Monolog-style multi-handler stack, all as plain ",[457,484,485],{},"slog.Handler"," values. On top, ",[457,488,466],{}," is a standalone formatter that renders ",[457,491,492],{},"[date] channel.LEVEL: message {context}"," lines, PHP-style, with full-path stack traces pulled out of an ",[495,496,497],"a",{"href":277},[457,498,272],{}," error.",[454,501,502,503,507,508,510,511,513,514,517,518,520],{},"It used to live as a subpackage of ",[495,504,505],{"href":432},[457,506,426],{},", imported as ",[457,509,426],{},"'s own ",[457,512,327],{}," subpackage; it has since moved into its own module, because composing a console logger has nothing to do with OpenTelemetry or Sentry wiring, and a program that just wants readable console logs shouldn't have to pull in the OTel SDK or sentry-go to get them. ",[457,515,516],{},"telemetry.Setup"," still uses ",[457,519,327],{}," exactly as before, just as a regular module dependency instead of a subpackage: nothing about the runtime behavior changed, only which module the code lives in.",[454,522,523,524,528,529,531,532,535,536,539,540,543,544,546,547,475,549,475,551,475,553,556],{},"Its only dependency is ",[495,525,526],{"href":277},[457,527,272],{},", and only from ",[457,530,466],{},": the formatter reads ",[457,533,534],{},"errs.CodeOf"," and walks ",[457,537,538],{},"errs.FullFrames","\u002F",[457,541,542],{},"errs.Frame"," to render a wrapped error's stack. The ",[457,545,327],{}," package itself (",[457,548,474],{},[457,550,478],{},[457,552,481],{},[457,554,555],{},"Config",") imports nothing beyond the standard library.",[558,559,561],"h2",{"id":560},"install","Install",[563,564,569],"pre",{"className":565,"code":566,"language":567,"meta":568,"style":568},"language-sh shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","go get github.com\u002Fgp-system\u002Flogx@main # no tagged release yet\n","sh","",[457,570,571],{"__ignoreMap":568},[572,573,576,580,584,587],"span",{"class":574,"line":575},"line",1,[572,577,579],{"class":578},"sBMFI","go",[572,581,583],{"class":582},"sfazB"," get",[572,585,586],{"class":582}," github.com\u002Fgp-system\u002Flogx@main",[572,588,590],{"class":589},"sHwdD"," # no tagged release yet\n",[592,593,594,607],"table",{},[595,596,597],"thead",{},[598,599,600,604],"tr",{},[601,602,603],"th",{},"Import path",[601,605,606],{},"What it adds",[608,609,610,632],"tbody",{},[598,611,612,617],{},[613,614,615],"td",{},[457,616,462],{},[613,618,619,620,623,624,475,626,475,628,475,630],{},"the ",[457,621,622],{},"slog"," composition: ",[457,625,474],{},[457,627,478],{},[457,629,481],{},[457,631,555],{},[598,633,634,639],{},[613,635,636],{},[457,637,638],{},"github.com\u002Fgp-system\u002Flogx\u002Fmonolog",[613,640,641,642,644],{},"the PHP\u002FMonolog-style console formatter, usable as a plain ",[457,643,485],{}," on its own",[558,646,164],{"id":647},"configuration",[454,649,650,653,654,657,658,661],{},[457,651,652],{},"logx.Config"," carries no env prefix of its own: the variables are meant to be embedded unprefixed, at the top level of whatever composes them (in the framework, ",[457,655,656],{},"telemetry.Config","'s ",[457,659,660],{},"Log"," field).",[592,663,664,677],{},[595,665,666],{},[598,667,668,671,674],{},[601,669,670],{},"Variable",[601,672,673],{},"Default",[601,675,676],{},"Meaning",[608,678,679,694,709],{},[598,680,681,686,691],{},[613,682,683],{},[457,684,685],{},"LOG_LEVEL",[613,687,688],{},[457,689,690],{},"INFO",[613,692,693],{},"the logger's minimum level (applies to every handler in the fanout)",[598,695,696,701,706],{},[613,697,698],{},[457,699,700],{},"LOG_STDOUT",[613,702,703],{},[457,704,705],{},"false",[613,707,708],{},"also write to the console in production mode (JSON); leave off when a collector scrapes container output, or you ingest twice",[598,710,711,716,723],{},[613,712,713],{},[457,714,715],{},"LOG_FORMAT",[613,717,718,719,722],{},"empty (",[457,720,721],{},"auto",")",[613,724,725,726,729],{},"the console format: empty means text in dev \u002F JSON in prod; ",[457,727,728],{},"monolog"," selects PHP\u002FMonolog-style lines regardless of mode",[454,731,732,733,735,736,739],{},"An unknown ",[457,734,715],{}," value fails ",[457,737,738],{},"Config.Validate()"," with an error instead of silently falling back.",[558,741,743],{"id":742},"the-composition-fanout-and-levelfilter","The composition: Fanout and LevelFilter",[454,745,746,747,749],{},"Three small ",[457,748,485],{}," combinators are the whole package:",[563,751,754],{"className":752,"code":753,"language":579,"meta":568,"style":568},"language-go shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","func ConsoleHandler(w io.Writer, cfg Config, dev bool, channel string) slog.Handler\nfunc Fanout(handlers ...slog.Handler) slog.Handler          \u002F\u002F several handlers, one record each\nfunc LevelFilter(min slog.Level, next slog.Handler) slog.Handler \u002F\u002F a minimum-level gate\n",[457,755,756,818,852],{"__ignoreMap":568},[572,757,758,762,766,769,773,776,779,782,785,788,791,793,796,800,802,805,808,810,813,815],{"class":574,"line":575},[572,759,761],{"class":760},"sMK4o","func",[572,763,765],{"class":764},"s2Zo4"," ConsoleHandler",[572,767,768],{"class":760},"(",[572,770,772],{"class":771},"sHdIc","w",[572,774,775],{"class":578}," io",[572,777,778],{"class":760},".",[572,780,781],{"class":578},"Writer",[572,783,784],{"class":760},",",[572,786,787],{"class":771}," cfg",[572,789,790],{"class":578}," Config",[572,792,784],{"class":760},[572,794,795],{"class":771}," dev",[572,797,799],{"class":798},"spNyl"," bool",[572,801,784],{"class":760},[572,803,804],{"class":771}," channel",[572,806,807],{"class":798}," string",[572,809,722],{"class":760},[572,811,812],{"class":578}," slog",[572,814,778],{"class":760},[572,816,817],{"class":578},"Handler\n",[572,819,821,823,826,828,831,834,836,838,841,843,845,847,849],{"class":574,"line":820},2,[572,822,761],{"class":760},[572,824,825],{"class":764}," Fanout",[572,827,768],{"class":760},[572,829,830],{"class":771},"handlers",[572,832,833],{"class":760}," ...",[572,835,622],{"class":578},[572,837,778],{"class":760},[572,839,840],{"class":578},"Handler",[572,842,722],{"class":760},[572,844,812],{"class":578},[572,846,778],{"class":760},[572,848,840],{"class":578},[572,850,851],{"class":589},"          \u002F\u002F several handlers, one record each\n",[572,853,855,857,860,862,865,867,869,872,874,877,879,881,883,885,887,889,891],{"class":574,"line":854},3,[572,856,761],{"class":760},[572,858,859],{"class":764}," LevelFilter",[572,861,768],{"class":760},[572,863,864],{"class":771},"min",[572,866,812],{"class":578},[572,868,778],{"class":760},[572,870,871],{"class":578},"Level",[572,873,784],{"class":760},[572,875,876],{"class":771}," next",[572,878,812],{"class":578},[572,880,778],{"class":760},[572,882,840],{"class":578},[572,884,722],{"class":760},[572,886,812],{"class":578},[572,888,778],{"class":760},[572,890,840],{"class":578},[572,892,893],{"class":589}," \u002F\u002F a minimum-level gate\n",[454,895,896,898,899,901,902,905],{},[457,897,478],{}," exists because not every leaf handler filters on its own (an OTLP bridge, for instance, forwards every record it is given): put it outermost and every handler behind it only ever sees records at or above the minimum level. ",[457,900,481],{}," hands each handler its own clone of the record and honors ",[457,903,904],{},"Enabled"," as a per-handler gate; with a single handler it returns it as-is, allocation-free.",[558,907,909],{"id":908},"usage","Usage",[454,911,912,913,915],{},"A plain Go program, no framework, no ",[457,914,426],{},":",[563,917,920],{"className":752,"code":918,"filename":919,"language":579,"meta":568,"style":568},"package main\n\nimport (\n    \"log\u002Fslog\"\n    \"os\"\n\n    \"github.com\u002Fgp-system\u002Flogx\"\n)\n\nfunc main() {\n    cfg := logx.Config{Level: slog.LevelInfo, Format: \"monolog\"}\n\n    slog.SetDefault(slog.New(\n        logx.LevelFilter(cfg.Level, logx.Fanout(\n            logx.ConsoleHandler(os.Stdout, cfg, true, \"myapp\"),\n            \u002F\u002F add more slog.Handler values here: a file handler, a custom sink, ...\n        )),\n    ))\n\n    slog.Info(\"service starting\", \"addr\", \":3000\")\n}\n","main.go",[457,921,922,930,936,945,956,966,971,980,986,991,1005,1054,1059,1082,1111,1152,1158,1164,1170,1175,1214],{"__ignoreMap":568},[572,923,924,927],{"class":574,"line":575},[572,925,926],{"class":760},"package",[572,928,929],{"class":578}," main\n",[572,931,932],{"class":574,"line":820},[572,933,935],{"emptyLinePlaceholder":934},true,"\n",[572,937,938,942],{"class":574,"line":854},[572,939,941],{"class":940},"s7zQu","import",[572,943,944],{"class":760}," (\n",[572,946,948,951,953],{"class":574,"line":947},4,[572,949,950],{"class":760},"    \"",[572,952,470],{"class":578},[572,954,955],{"class":760},"\"\n",[572,957,959,961,964],{"class":574,"line":958},5,[572,960,950],{"class":760},[572,962,963],{"class":578},"os",[572,965,955],{"class":760},[572,967,969],{"class":574,"line":968},6,[572,970,935],{"emptyLinePlaceholder":934},[572,972,974,976,978],{"class":574,"line":973},7,[572,975,950],{"class":760},[572,977,462],{"class":578},[572,979,955],{"class":760},[572,981,983],{"class":574,"line":982},8,[572,984,985],{"class":760},")\n",[572,987,989],{"class":574,"line":988},9,[572,990,935],{"emptyLinePlaceholder":934},[572,992,994,996,999,1002],{"class":574,"line":993},10,[572,995,761],{"class":760},[572,997,998],{"class":764}," main",[572,1000,1001],{"class":760},"()",[572,1003,1004],{"class":760}," {\n",[572,1006,1008,1012,1015,1018,1020,1022,1025,1027,1029,1031,1033,1036,1038,1041,1043,1046,1048,1051],{"class":574,"line":1007},11,[572,1009,1011],{"class":1010},"sTEyZ","    cfg ",[572,1013,1014],{"class":760},":=",[572,1016,1017],{"class":578}," logx",[572,1019,778],{"class":760},[572,1021,555],{"class":578},[572,1023,1024],{"class":760},"{",[572,1026,871],{"class":1010},[572,1028,915],{"class":760},[572,1030,812],{"class":1010},[572,1032,778],{"class":760},[572,1034,1035],{"class":1010},"LevelInfo",[572,1037,784],{"class":760},[572,1039,1040],{"class":1010}," Format",[572,1042,915],{"class":760},[572,1044,1045],{"class":760}," \"",[572,1047,728],{"class":582},[572,1049,1050],{"class":760},"\"",[572,1052,1053],{"class":760},"}\n",[572,1055,1057],{"class":574,"line":1056},12,[572,1058,935],{"emptyLinePlaceholder":934},[572,1060,1062,1065,1067,1070,1072,1074,1076,1079],{"class":574,"line":1061},13,[572,1063,1064],{"class":1010},"    slog",[572,1066,778],{"class":760},[572,1068,1069],{"class":764},"SetDefault",[572,1071,768],{"class":760},[572,1073,622],{"class":1010},[572,1075,778],{"class":760},[572,1077,1078],{"class":764},"New",[572,1080,1081],{"class":760},"(\n",[572,1083,1085,1088,1090,1092,1094,1097,1099,1101,1103,1105,1107,1109],{"class":574,"line":1084},14,[572,1086,1087],{"class":1010},"        logx",[572,1089,778],{"class":760},[572,1091,478],{"class":764},[572,1093,768],{"class":760},[572,1095,1096],{"class":1010},"cfg",[572,1098,778],{"class":760},[572,1100,871],{"class":1010},[572,1102,784],{"class":760},[572,1104,1017],{"class":1010},[572,1106,778],{"class":760},[572,1108,481],{"class":764},[572,1110,1081],{"class":760},[572,1112,1114,1117,1119,1121,1123,1125,1127,1130,1132,1134,1136,1140,1142,1144,1147,1149],{"class":574,"line":1113},15,[572,1115,1116],{"class":1010},"            logx",[572,1118,778],{"class":760},[572,1120,474],{"class":764},[572,1122,768],{"class":760},[572,1124,963],{"class":1010},[572,1126,778],{"class":760},[572,1128,1129],{"class":1010},"Stdout",[572,1131,784],{"class":760},[572,1133,787],{"class":1010},[572,1135,784],{"class":760},[572,1137,1139],{"class":1138},"sfNiH"," true",[572,1141,784],{"class":760},[572,1143,1045],{"class":760},[572,1145,1146],{"class":582},"myapp",[572,1148,1050],{"class":760},[572,1150,1151],{"class":760},"),\n",[572,1153,1155],{"class":574,"line":1154},16,[572,1156,1157],{"class":589},"            \u002F\u002F add more slog.Handler values here: a file handler, a custom sink, ...\n",[572,1159,1161],{"class":574,"line":1160},17,[572,1162,1163],{"class":760},"        )),\n",[572,1165,1167],{"class":574,"line":1166},18,[572,1168,1169],{"class":760},"    ))\n",[572,1171,1173],{"class":574,"line":1172},19,[572,1174,935],{"emptyLinePlaceholder":934},[572,1176,1178,1180,1182,1185,1187,1189,1192,1194,1196,1198,1201,1203,1205,1207,1210,1212],{"class":574,"line":1177},20,[572,1179,1064],{"class":1010},[572,1181,778],{"class":760},[572,1183,1184],{"class":764},"Info",[572,1186,768],{"class":760},[572,1188,1050],{"class":760},[572,1190,1191],{"class":582},"service starting",[572,1193,1050],{"class":760},[572,1195,784],{"class":760},[572,1197,1045],{"class":760},[572,1199,1200],{"class":582},"addr",[572,1202,1050],{"class":760},[572,1204,784],{"class":760},[572,1206,1045],{"class":760},[572,1208,1209],{"class":582},":3000",[572,1211,1050],{"class":760},[572,1213,985],{"class":760},[572,1215,1217],{"class":574,"line":1216},21,[572,1218,1053],{"class":760},[454,1220,1221,1222,1224,1225,1228],{},"Inside the framework, ",[457,1223,516],{}," builds the default logger the same way, just with two more handlers in the fanout: the OTel log bridge and the Sentry capture handler. See ",[495,1226,1227],{"href":436},"Telemetry: Logging"," for that composition.",[558,1230,1232],{"id":1231},"related-pages","Related pages",[1234,1235,1236,1250,1262],"ul",{},[1237,1238,1239,1242,1243,1246,1247,1249],"li",{},[495,1240,1241],{"href":337},"logx: Monolog formatter",": the ",[457,1244,1245],{},"[date] channel.LEVEL: message"," format, stack traces from ",[457,1248,272],{},", and a Laravel\u002FSymfony concept mapping.",[1237,1251,1252,1255,1256,1258,1259,1261],{},[495,1253,1254],{"href":432},"Telemetry: Overview",": how ",[457,1257,516],{}," fans ",[457,1260,327],{},"'s console handler out alongside the OTel bridge and the Sentry handler.",[1237,1263,1264,1267,1268,1270],{},[495,1265,1266],{"href":277},"errs: Overview",": the error type ",[457,1269,466],{}," renders stack traces from.",[1272,1273,1274],"style",{},"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 .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 .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 .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}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 .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}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 .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}",{"title":568,"searchDepth":820,"depth":820,"links":1276},[1277,1278,1279,1280,1281],{"id":560,"depth":820,"text":561},{"id":647,"depth":820,"text":164},{"id":742,"depth":820,"text":743},{"id":908,"depth":820,"text":909},{"id":1231,"depth":820,"text":1232},"A standalone slog composition (console format, level filtering, fanout) plus a PHP\u002FMonolog-style console formatter.","md",null,{},{"icon":328},{"title":52,"description":1282},"w_MWhYwLnVS9l7_LUQnpD0z-ki3v000KM3wZ03cEMOg",[1290,1292],{"title":322,"path":323,"stem":324,"description":1291,"icon":325,"children":-1},"Struct-tag-based request validation with go-playground\u002Fvalidator, run as strict middleware, with 422 problem responses.",{"title":336,"path":337,"stem":338,"description":1293,"icon":47,"children":-1},"A PHP\u002FMonolog-style console formatter, with full-path stack traces pulled out of an errs error.",1787346801465]