logdna / nodejs

Node.js library for logging to LogDNA
MIT License
74 stars 66 forks source link

Question: does the logger work client side? #17

Closed iamdevonbutler closed 7 years ago

iamdevonbutler commented 7 years ago

and if not, is there another client logger?

respectus commented 7 years ago

Hey @iamdevonbutler, thanks for the inquiry, it's definitely an interesting question. I believe it should work on the client side, but I have not yet tested it myself. I'd think there are probably a few ways to include it on the client side, maybe with browserify. Please feel free to import it on the client and test out if it works. I am quite sure it will work as expected, but one important consideration for client side logging is CORS and you will have to whitelist the domain from which the requests are originating. So for example if you are sending your logs from myexample.com, please login to app.logdna.com, then click the gear menu. Please navigate to the Account Profile page and here you will find a section for whitelist domains. If you add myexample.com to the whitelist domains section you will be able to send logs to logdna.com through your whitelisted domain. After whitelisting your domain this module should be able to make client side requests. Thanks for bringing this up, if the module doesn't work on the client side I'll be happy to reopen this issue and we'll work on getting a client side library.

makstaks commented 5 years ago

@iamdevonbutler have you confirmed whether this works client-side?

balramkhichar commented 5 years ago

Doesn't work for me with webpack. Screenshot 2019-06-13 at 6 00 09 PM