Closed fdescamps closed 6 years ago
Hi,
Thanks for you work. I use your module to log in appinsight from my nodejs app. But I have a question, is it possible to use a log formatter ?
function **logFormatter**(options) { const timestamp = moment().unix(); const hostname = os.hostname(); return `${timestamp}-${hostname}-${winston.config.colorize(options.level)}-${options.message}`; } [...] winston.add(require('winston-azure-application-insights').AzureApplicationInsightsLogger, { key: process.env[config.logger.appinsight_key], treatErrorsAsExceptions: true, handleExceptions: true, humanReadableUnhandledException: true, **formatter: **logFormatter**,** });
I tried to use classically (see above) but it does not work.
Thanks by advance,
F.
https://github.com/bragma/winston-azure-application-insights/pull/7
Resolved by #12 but you'll need to upgrade to 1.3 when it ships.
Hi,
Thanks for you work. I use your module to log in appinsight from my nodejs app. But I have a question, is it possible to use a log formatter ?
I tried to use classically (see above) but it does not work.
Thanks by advance,
F.