Giter Club home page Giter Club logo

Comments (4)

endquote avatar endquote commented on August 13, 2024

ampm won't know anything about your source code, so yes, you'd need to send it things like line numbers and file names. If AMPMClient.cpp could be changed such that it had an error method which automatically collected that info and sent it on to ampm, that would be most welcome.

The JavaScript client does send the stack trace and line numbers on errors, maybe you could do similar for c++.
https://github.com/stimulant/ampm/blob/master/samples/web/libs/ampm.js#L134

from ampm.

richardeakin avatar richardeakin commented on August 13, 2024

The current AMPMClient.cpp sends through line and lineNum to the server, but these are ignored by the server?

I'm happy just prepending the location data to the message, but looking at AMPMClient.cpp made me think this wasn't expected.

from ampm.

endquote avatar endquote commented on August 13, 2024

I looked into this. The log object is making it through to _logMessage here, but only the .message attribute ends up in the log file.

https://github.com/stimulant/ampm/blob/master/model/logging.js#L215

AMPMClient.cpp probably shouldn't construct a message object like that, because you'd reasonably assume something is happening with the other attributes... but it's not. A great PR would be to change it to examine the level to see if it's error, and if so, construct a string with all the info you want in it, which is what the JavaScript client does.

from ampm.

richardeakin avatar richardeakin commented on August 13, 2024

Okay, that makes sense to me. The file and line number already have to come from the client app, so we might as well bake it into the message on the client side (which is what I ended up doing).

from ampm.

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.