Giter Site home page Giter Site logo

Comments (4)

qiujiayu avatar qiujiayu commented on May 29, 2024

不建议在代码中打太多的日志,日志多了,返而不容易查找问题,这块自己写单元测试就很容易解决问题。

from autoloadcache.

qinerg avatar qinerg commented on May 29, 2024

个人感觉应该加上日志,哪怕日志的级别低一些(如trace)。
实际使用中,用户会根据实际情况屏蔽掉一些包的日志。但如果没有日志,则不方便定位于问题。

from autoloadcache.

qiujiayu avatar qiujiayu commented on May 29, 2024

表达式解析如果要调试,还要打印它的上下文,不然打出来的日志意义也不大,这样一来打印的东西就变多了。从我个人经验来说,表达式都会写得非常简单明了,可以不需要调式就能看明白。

from autoloadcache.

qinerg avatar qinerg commented on May 29, 2024

不用考虑上下文吧,那样就扩大化了。主要是基本信息也没有。我认为打印key有几方面用处:
1、调优缓存key;
2、发现bug,需要手工维护缓存时,能够直接看到key值,而不需自己推断;
表达式可能很长,因为需要做空值判断的,否则可能会有空指针问题。
没事,如果楼主觉得影响了性能不合适可以不加。反正是开源的,可以自行调整的

from autoloadcache.

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.