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.
1. Centralized logging
WHAT
pinologging, but you can attach custom transports (DataDog, Sentry, your own system) and it works in both Node.js and browsers.import { getChildLogger } from '@lit-protocol/logger';instead ofconsole.log.USAGE
Centralized logging for the Lit Protocol SDK. The default backend is structured
pinologging, but you can attach custom transports (DataDog, Sentry, your own system) and it works in both Node.js and browsers.Basic usage
Log levels
Logging verbosity is controlled by:
process.env.LOG_LEVELglobalThis.LOG_LEVELSupported levels:
silent,fatal,error,warn,info,debug,trace,debug_text.debug_textswitches the default output to console-style text (not JSON).debug2is a deprecated alias fordebug_text.Configuration
Use
setLoggerOptionsat app startup to change level/name or add metadata:2. Consolidate CURL debugging
WHAT
@lit-protocol/loggerand point both Lit node and Wrapped Keys request paths at the shared implementation, preserving the opt-inLIT_DEBUG_CURLbehavior while eliminating duplicated fs/path/env logic.USAGE
After your run, copy the correlation id (for example
X-Request-Idfrom node calls, orx-correlation-id/ theRequest(<id>)value from Wrapped Keys errors) and print the stored curl command:If you only have a prefix/substring,
pnpm debug:curlwill try to match it (and will list matches if more than one file fits).