Skip to content
New issue

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

Logger fallback to console.error if process._rawDebug is missing #590

Closed
wants to merge 2 commits into from

Conversation

nickg
Copy link

@nickg nickg commented Nov 25, 2024

When running under Deno instead of NodeJS I get the following stack trace when the native extension is loaded:

N-API call failed: napi_create_threadsafe_function( env, node_rawdebug, NULL, resource_name, 0, 1, ctx, s_threadsafe_log_finalize, ctx, s_threadsafe_log_call, &ctx->log_drain)                                                                                                                                                                           
    @ /codebuild/output/src1849732470/src/aws-crt-nodejs/source/logger.c:277: napi_function_expected                                                   
Fatal error condition occurred in /codebuild/output/src1849732470/src/aws-crt-nodejs/source/logger.c:277: napi_create_threadsafe_function( env, node_rawdebug, NULL, resource
_name, 0, 1, ctx, s_threadsafe_log_finalize, ctx, s_threadsafe_log_call, &ctx->log_drain)                                                                                
Exiting Application

Deno does not provide console._rawDebug so fall back to console.error instead.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@waahm7
Copy link
Contributor

waahm7 commented Dec 16, 2024

Thanks, following up in a new PR to fix the lint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants