winston-highstorm
v0.0.4
Published
A Winston Transport to Stream Data to Highstorm
Maintainers
Readme
winston-highstorm
It's a package to upload winston's log steam to Highstorm.
Usage
This is how you can use this package:
// highstorm-transport.js
const { HighstormTransport } = require("@celeroncoder/highstorm-winston");
const { HIGHSTORM_KEY } = process.env;
const highstorm = new HighstormTransport({
token: HIGHSTORM_KEY!, // required
channelName: "<chanel_name>", // required
});
export default highstorm;// logger.js
const winston = require('winston');
const highstorm = require("./highstorm-transport.js")
const logger = winston.createLogger({
...
transports: [
highstorm
],
...
});
Add
HIGHSTORM_KEYenvironment variable from the Highstorm dashboard.Make sure to use the recommended highstorm channel name format.
You can also add default transport option when initializing the
HighstormTransport.
License
This package is under MIT License
