We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It would be useful to expose the logger functionality instead of the default console.
Something like:
types.ts
export type InputType = { // ... enableDebugLogs?: boolean; logger?: (message: string) => void; }
fetch.ts
static init(options: InputType) { let config = validateAndNormaliseInputOrThrowError(options); if (options.enableDebugLogs !== undefined && options.enableDebugLogs) { enableLogging(options.logger); }
logger.ts
let _logger = console.log; export function enableLogging(logger?: (message:string) => void) { __supertokensWebsiteLogging = true; if (logger) { _logger = logger } } export function logDebugMessage(message: string) { if (__supertokensWebsiteLogging) { _logger( `${SUPERTOKENS_DEBUG_NAMESPACE} {t: "${new Date().toISOString()}", message: \"${message}\", supertokens-react-native: "${version}"}` ); } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
It would be useful to expose the logger functionality instead of the default console.
Something like:
types.ts
fetch.ts
logger.ts
The text was updated successfully, but these errors were encountered: