mirror of
https://github.com/bourquep/mysa-js-sdk.git
synced 2026-02-04 01:31:05 +00:00
Added option to enable AWS CRT debug logging
This commit is contained in:
@@ -20,6 +20,7 @@ const rootLogger = pino({
|
||||
/** Main entry point of the example application. */
|
||||
async function main() {
|
||||
let session: MysaSession | undefined;
|
||||
|
||||
try {
|
||||
rootLogger.info('Loading session...');
|
||||
const sessionJson = await readFile('session.json', 'utf8');
|
||||
@@ -27,7 +28,11 @@ async function main() {
|
||||
} catch {
|
||||
rootLogger.info('No valid session file found.');
|
||||
}
|
||||
const client = new MysaApiClient(session, { logger: rootLogger.child({ module: 'mysa-js-sdk' }) });
|
||||
|
||||
const client = new MysaApiClient(session, {
|
||||
logger: rootLogger.child({ module: 'mysa-js-sdk' }),
|
||||
isAwsCrtDebugLoggingEnabled: process.env.AWS_CRT_DEBUG_LOGGING === '1'
|
||||
});
|
||||
|
||||
client.emitter.on('sessionChanged', async (newSession) => {
|
||||
if (newSession) {
|
||||
|
||||
Reference in New Issue
Block a user