GithubHelp home page GithubHelp logo

Comments (9)

corsa1r avatar corsa1r commented on June 18, 2024 2

If you don't catch http request fails they will be handled by loggly. In my case to prevent endless offline logs i have to add .catch(console.error) to $http.post that logger method uses to send logs.

//current version
//Ajax call to send data to logglyÎ
$http.post(buildUrl(), sentData, config);

//my fix
//Ajax call to send data to logglyÎ
$http.post(buildUrl(), sentData, config).catch(console.error);
`

from angular-loggly-logger.

ajbrown avatar ajbrown commented on June 18, 2024 1

@Cleod9 thanks for kicking this back to my inbox. I just merged the PR for this in and will cut a new release here shortly.

from angular-loggly-logger.

icedice avatar icedice commented on June 18, 2024

Any news on this? Am using this nice wrapper in a Ionic/cordova app, my only problem is when the app is offline and a error occurs it will try to log to loggly and this fires another error which sends the app into a infinite loop and it eventually crashes. Is there anyway to disable and enable the logglyLogger at runtime? that way I would be able to disable it when "offline" event fires and enable when "online" event fires.

from angular-loggly-logger.

ajbrown avatar ajbrown commented on June 18, 2024

@icedice Thanks for the info, I didn't realize how bad this really was. I was holding off on this feature for the next major release, but from the sound of it it's much more urgent. I'll throw something together here in the next couple of days.

from angular-loggly-logger.

icedice avatar icedice commented on June 18, 2024

You don't need to hurry. I did a quick customisation of your (great) wrapper så it only tries to contact loggly if it is online. This means that I loose messages when the app is offline but this is not critical for me also it could be solved with some kind of cache which then sends it when it's back online. Anyways I still thing this would be a great feature en a future release.

from angular-loggly-logger.

ajbrown avatar ajbrown commented on June 18, 2024

Would you mind opening a pull request for it? I'd love to see what you've
done.

On Fri, Sep 9, 2016 at 11:22 AM, Toke Refstrup [email protected]
wrote:

You don't need to hurry. I did a quick customisation of your (great)
wrapper så it only tries to contact loggly if it is online. This means that
I loose messages when the app is offline but this is not critical for me
also it could be solved with some kind of cache which then sends it when
it's back online. Anyways I still thing this would be a great feature en a
future release.


You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
#36 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AACWMvUHERfFsKVdmpY3LiqqIbYKJ4xdks5qoXmbgaJpZM4GvR72
.

A.J. Brown
@AdrianJBrown http://twitter.com/adrianjbrown on Twitter
http://ajbrown.org on The Web

from angular-loggly-logger.

icedice avatar icedice commented on June 18, 2024

Sure, but it's just a really quick fix, basically I just surrounded the ajax call to loggly so it only gets called if we have net. I'm using Cordova network plugin if available otherwise I use navigator.onLine....

from angular-loggly-logger.

Cleod9 avatar Cleod9 commented on June 18, 2024

I assume this project has likely kicked the bucket, but I wanted to point out how serious of an issue this is. I've confirmed that users who use uBlock Origin are likely heavily affected by this issue, because loggly is blocked before the request goes out. This mimics an "offline" effect, throwing the app into an infinite memory-consuming loop.

See uBlock's logs below:

image

See Firefox's Memory Usage as well:

image
(Same issue in Chrome though at least Chrome will abort the tab after a certain point)

If I didn't know any better I would have thought something malicious was going on 😬

from angular-loggly-logger.

ajbrown avatar ajbrown commented on June 18, 2024

This has been fixed and released in 0.3.2

from angular-loggly-logger.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.