🗃️ Custom Logger

The App will provide a default logger, but you can also provide your own. The default Logger instance will be set to ConsoleLogger from the @microsoft/spark.common package.

import { App } from '@microsoft/spark.apps'; import { ConsoleLogger } from '@microsoft/spark.common'; // initialize app with custom console logger // set to debug log level const app = new App({ logger: new ConsoleLogger('echo', { level: 'debug' }), }); app.on('message', async ({ send, activity, log }) => { log.debug(activity); await send({ type: 'typing' }); await send(`you said "${activity.text}"`); }); (async () => { await app.start(); })();