Giter VIP home page Giter VIP logo

Comments (3)

towergame avatar towergame commented on July 27, 2024

The issue seems to be with the fact that logger.log calls logger.debug (since they both perform the same duty), which moves the actual caller a line down in the stack trace.

Fixing this should be a simple matter of just moving the logic for figuring out which line called the logger to the initial logging functions themselves (and not logger.write).

from yatsl.

towergame avatar towergame commented on July 27, 2024

Pushed a bandaid fix in #19, but I should figure out a better way of getting the line for next minor revision.

from yatsl.

sakars avatar sakars commented on July 27, 2024

I don't think the public log function should call debug as that is a public function and from the current TODO statement, it looks like you are attempting to make an exception to a function call.

If you want both functions to have the same behaviour, then point them to the same private function. That woud make getCallSignature break. A solution would be to generate the error at the top public function level and then pass it down to getCallSignature. Then the stack would always be just one level too deep.

from yatsl.

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.