Gathering detailed insights and metrics for winston-office365-connector-hook
Gathering detailed insights and metrics for winston-office365-connector-hook
Gathering detailed insights and metrics for winston-office365-connector-hook
Gathering detailed insights and metrics for winston-office365-connector-hook
A Winston transport hook to send logs over to a Office 365 Connector.
npm install winston-office365-connector-hook
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
1 Stars
46 Commits
2 Forks
1 Branches
1 Contributors
Updated on Nov 01, 2019
Latest Version
0.1.7
Package Id
winston-office365-connector-hook@0.1.7
Size
163.28 kB
NPM Version
4.2.0
Node Version
6.9.2
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
A Winston transport hook to send logs over to a Office 365 Connector, e.g. Microsoft Teams channel.
Inspired by winston-slack-hook by fahad19.
Uses queue implementation by jessetane for processing transport tasks.
$ npm install --save winston winston-office365-connector-hook
Note that Office 365 Connector Webhook URL is tied to a given channel, so you don't need to specify a channel name separately.
1var winston = require('winston'); 2var Office365ConnectorHook = require('winston-office365-connector-hook'); 3 4var Logger = winston.Logger; 5var Console = winston.transports.Console; 6 7var logger = new Logger({ 8 transports: [ 9 new Console({}), 10 new Office365ConnectorHook({ 11 hookUrl: 'https://outlook.office.com/webhook/XXXXXXXXXXXXX' // No need for a channel name 12 }) 13 ] 14}); 15 16logger.info('I am being logged here'); // will be sent to both console and Teams channel
Require:
hookUrl
: Connector Webhook URL to post toOptional:
prependLevel
: set to true
by default, sets [level]
at the beginning of the messageappendMeta
: set to true
by default, sets stringified meta
at the end of the messageformatter(options)
: function for transforming the message before posting to Slackcolors
: use this to set custom colors to log levels. Note that you MUST use hex format, not names.
e.g. "colors": {
"debug": "4256f4",
"error": "f00"
}
Behind the scenes, the level color is sent as the
themeColor
property of the card.
Channel messages support Markdown syntax. Any formatting is sent as-is to the Channel.
logger.info('# Seriously!?\n > This is cool!', { title: 'You can use Markdown in messages.' });
You can set a title
for the card by sending it as a part of the meta
hash:
logger.info('This text appears in card body.', { title: 'My puny title' });
Messages can be formatted further before posting to the channel:
1var logger = new Logger({
2 transports: [
3 new Office365ConnectorHook({
4 hookUrl: 'https://outlook.office.com/webhook/XXXXXXXXXXXXX'
5
6 formatter: function (options) {
7 var message = options.message; // original message
8
9 // var level = options.level;
10 // var meta = options.meta;
11
12 // do something with the message
13
14 return message;
15 }
16 })
17 ]
18});
See here
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
no SAST tool detected
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
12 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-14
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More