0.0.4 • Published 12 months ago

winston-highstorm v0.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months 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

12 months ago

0.0.3

12 months ago

0.0.2

12 months ago

0.0.1

12 months ago