Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update version to 2.0.0 #95

Open
1212gmartinez opened this issue Jul 23, 2020 · 6 comments
Open

Update version to 2.0.0 #95

1212gmartinez opened this issue Jul 23, 2020 · 6 comments

Comments

@1212gmartinez
Copy link

Winston version 3.0 has been out for over 2 years at this point. It seems that the v2 branch of this repo works with winston@^3.0.0.

Is is possible to merge the v2 branch to master and update the version?

@1212gmartinez
Copy link
Author

@kenperkins @troy @ffxsam Any update on this?

@troy
Copy link
Contributor

troy commented Aug 4, 2020

@1212gmartinez: I'm no longer a maintainer, but @markdascher may have some comments.

@ffxsam
Copy link
Collaborator

ffxsam commented Aug 4, 2020

Ditto, I'm no longer using Papertrail.

@1212gmartinez
Copy link
Author

@kenperkins @markdascher any update on this?

@kenperkins
Copy link
Owner

I'd have to dig back in and refresh myself on this project. I haven't touched any of these in quite some time.

@markdascher
Copy link
Collaborator

I started looking into this again, but came across an alternative that might actually work better. The winston-syslog transport is maintained by winston contributors, already built for v3, and recently added TLS support. I just tried it out, and it worked well:

const os = require('os');
const winston = require('winston');
require('winston-syslog');

const papertrail = new winston.transports.Syslog({
  host: 'logsN.papertrailapp.com',
  port: XXXXX,
  protocol: 'tls4',
  localhost: os.hostname(),
  eol: '\n',
});

const logger = winston.createLogger({
  format: winston.format.simple(),
  levels: winston.config.syslog.levels,
  transports: [papertrail],
});

logger.info('hello papertrail');

In other news, Papertrail recently added native HTTPS ingestion support, so if you just need to send in JSON logs, Winston's native Http transport would also work:

const winston = require('winston');

const papertrail = new winston.transports.Http({
  host: 'logs.collector.solarwinds.com',
  path: '/v1/log',
  auth: { username: new String(''), password: 'TOKEN' },
  ssl: true,
});

const logger = winston.createLogger({
  transports: [papertrail],
});

logger.info('hello papertrail');

@1212gmartinez can you see if one of these transports works for your purposes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants