winston-highstorm
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

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

Package Sidebar

Install

npm i winston-highstorm

Weekly Downloads

7

Version

0.0.4

License

MIT

Unpacked Size

5.81 kB

Total Files

7

Last publish

Collaborators

  • celeron