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

Disable logging when page is loaded by webcrawler #52

Closed
kc1116 opened this issue Nov 20, 2017 · 3 comments
Closed

Disable logging when page is loaded by webcrawler #52

kc1116 opened this issue Nov 20, 2017 · 3 comments

Comments

@kc1116
Copy link

@kc1116 kc1116 commented Nov 20, 2017

Is there a way that I can disable my loggly logger whenever a webpage is loaded by a web crawler ? I have a Javascript Lib that logs using loggly. It is installed on some client sites, when their sites get loaded by a webcrawler some "errors" happen and force loggly to log a bunch of false positives. How can I handle this ?

@mostlyjason
Copy link
Contributor

@mostlyjason mostlyjason commented Nov 20, 2017

Have you considered only loading the Loggly logger when the user agent is not the web crawler? You'll have to look at the logs to see what the user agent of the web crawler is in order to exclude it. This is something you can do on your end and doesn't necessarily need to be in the library. Some people may want to know about errors when a crawler runs but if you don't you could add code to prevent this.

@kc1116
Copy link
Author

@kc1116 kc1116 commented Nov 20, 2017

Thanks for the response, does loggly capture the userAgent by default or is that something I should send with events ?

@kc1116 kc1116 closed this Nov 20, 2017
@mostlyjason
Copy link
Contributor

@mostlyjason mostlyjason commented Nov 21, 2017

I don't think so, you should send it. We usually capture it with access logs, such as coming from a web, application or proxy server.

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.