0.0.4 • Published 2 years ago

winston-highstorm v0.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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_KEY environment 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

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago