docs: add a libraries section for SDK and package authors - #694
Open
evlogai[bot] wants to merge 4 commits into
Open
evlogai[bot] wants to merge 4 commits into
evlogai[bot] wants to merge 4 commits into
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
3 Skipped Deployments
|
Contributor
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Contributor
|
Thank you for following the naming conventions! 🙏 |
commit: |
… and testing guidance
…alogs Lead the overview with a real before/after from @github-tools/sdk instead of the initLogger() rule, introduce the package once as the running example, and add three pages the section was missing: writing why/fix/link for models, exporting the catalog to Markdown/JSON/llms.txt, and a five-step migration from bare throws. Reorder Emitting Events to lead with the request-logger pattern, ground Structured Errors in the real catalog with the exact toJSON/parseError shapes, add the section navigation file, and fix the dead /use-cases/libraries link in Extend.
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds library-author guidance to the docs, restructured as a dedicated top-level section rather than a single use-case page. Library and SDK authors are a major adoption vector: their users inherit evlog's output shape, so how a library emits, structures errors, and stays testable decides what thousands of host applications log.
New section:
/libraries(4 pages)initLogger()(it is process-wide and last-call-wins via the symbol registry); use the object formlog.info({ source, message })so asourcefield identifies your package on the host's wide events; tag the event for your library; join the host's request with theAuditableLoggerthe framework integration passes in; depend on evlog as a peer dependency and expect the multi-major warning.defineErrorCatalog('myprefix', ...)so host applications get stablemyprefix.CODEerrors withstatus, typed templatedmessage,why,fix,link, and backend-onlyinternalcontext.Side effects of the renumbering
extend→7,reference→8,compare→9directory prefixes. Public URLs are unchanged (numeric prefixes are not part of slugs), only on-disk ordering.create-enricher,write-evlog-contentsurfaces)./learn/simple-logging,/integrate/frameworks/standalone,/extendoverview,/use-casesoverview, catalogs page).Verification
pnpm content:lint; docs lint clean; docs tests 143 passed; content-lint tests 155 passed.packages/evlog/src: object form drains withsourcepreserved;defineErrorCatalogfactories produceprefix.CODE, typed message functions,statusdefaulting to 500,internalomitted fromtoJSON;EvlogError.isEvlogErroron a caught copy; collecting drain types compile under strict TS.