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

Docs are woefully inaccurate #10

Open
ghost opened this issue Sep 19, 2017 · 1 comment
Open

Docs are woefully inaccurate #10

ghost opened this issue Sep 19, 2017 · 1 comment

Comments

@ghost
Copy link

ghost commented Sep 19, 2017

The bunyan-lumberjack docs say that any connection option that can be used on node-lumberjack-protocol (your doc link is to node-lumberjack-proto, which doesn't exist and returns 404), can also be passed into the lumberjackOptions. I could not get log entries to arrive at logstash and was getting NO errors when logging. It turned out that I needed to attach a handler to on('disconnect') in order to see the error, which was related to my specifying the hostname as ip address instead of hostname and the ip address not being in the server's certificate. But there's a lumberjack option to specify the function which is used to validate the cert, and another option which should disable certificate checks entirely, and neither of them does anything in bunyan-lumberjack, so far as I can tell.

Actually, I take that back. It turns out that those particular lumberjack options are expected in the tlsOptions. But there is certainly no mention of that in the docs, and I have wasted endless hours chasing this stuff down. A verbose mode that will issue errors/console statements synchronously when you attempt to log something to an un-connected stream would go a long way toward making it at least slightly possible to debug this stuff. Same goes for specifying the events on the bunyan stream that can be subscribed to somewhere in the docs rather than in the example. Same goes for listing the available options and WHERE they can be specified. Coding by trial-and-error is a massive waste of time and enormous frustrating.

And for what it is worth, I was able to use the node-lumberjack-protocol library with an ip address in my own code without overriding the security checks by putting the address in the cert, so it would seem that the strict forbidding of ip address hosts in the connection options is specific to the bunyan-lumberjack stream.

@jwalton
Copy link
Contributor

jwalton commented Sep 19, 2017

Hey, sorry to hear you're having some trouble. If there's specific parts of the documentation that you found unclear, please feel free to submit a PR. It's easier for someone unfamiliar with the library to find that kind of thing, for sure. :)

Which doc link is 404ing for you?

node-bunyan-lumberjack doesn't do anything specific for SSL, (and, neither really does node-lumberjack-protocol - it just passes the tlsOptions straight through to node's tls library) so I'm surprised it worked in the one case and not in the other. You might find this a helpful read -
it's a little out of date at this point, but it should get you through most of your TLS problems.

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

No branches or pull requests

1 participant