Code Monkey home page Code Monkey logo

Comments (7)

splink avatar splink commented on August 29, 2024

Hey Karel,
thanks for your praise :)

You can silence the logs via logback.conf. See Line 29 in https://github.com/splink/pagelets-seed/blob/master/conf/logback.xml If you set the level to OFF or WARN, the logs will disappear.

I think INFO is an appropriate level for this kind of information. I think it is quite helpful to see how the individual pagelets (in a production system) perform. You can also easily aggregate the values and plot enlightening graphs.

Cheers,
Max

from pagelets.

KarelCemus avatar KarelCemus commented on August 29, 2024

Sure I can rise the level in logback, I already did. I just meant to let you know my opinion. IMO, INFO level should be somehow significant for the application to inform you about what happens in there as it is highest non-error log level. For example some business flow or possibly about connecting to/disconnecting from some services etc. Flooding logs with performance tracing messages does not fit into my view of INFO. However, I fully agree with you that easily tracing performance might be helpful even in production, but as it is tracing performance, I don't think the INFO level is appropriate. Finally, when you can suppress logging INFO, you can as well enable logging DEBUG/TRACE in production when it is necessary.

By the way, first I saw those INFO logs it came to me as another idea. I though that you are logging them as INFO in development mode but I hopped I will reduce the level for production mode. This might be also interesting feature.

Either way, If you disagree, you can freely close this issue.

Best, Karel

from pagelets.

splink avatar splink commented on August 29, 2024

I'll think about it. Somehow it doesn't feel semantically right to call that kind of log "debug". I also want to keep the option to add some log statements which fit into the category debug (currently there are none in pagelets).
So if I would change the performance output logs to be at level debug or even trace, other debug/trace level logs which I don't want to log in production would also be logged. But I usually want to see these performance measuring logs in production.

from pagelets.

KarelCemus avatar KarelCemus commented on August 29, 2024

I see. Then what about another performance logger and log page performance as debug and leaf performance as trace? You'd have a full control and still would not produce performance tracing at info level.

from pagelets.

 avatar commented on August 29, 2024

I don't really understand the problem. In case of the page builder and the leaf builder there are two loggers .. (val log = play.api.Logger("LeafBuilder").logger) - so it should be possible for you to set the logging level for "LeafBuilder" to any level you want...

from pagelets.

KarelCemus avatar KarelCemus commented on August 29, 2024

@fbe Are you reacting at me or at @splink?

My proposal is just to reduce info level of those messages because IMO performance tracing messages should not be logged with this level. I do not object anything against these loggers at all and I am aware of custom settings of those loggers. This is just about semantics.

from pagelets.

splink avatar splink commented on August 29, 2024

@KarelCemus After some consideration, I have to say that I don't like the idea of two loggers and I also find that "INFO" is the semantically appropriate level for these kind of logs. I know that you don't agree, but you have fine-grained control over the logs though your logback configuration, so my views shouldn't bother you too much ;)

from pagelets.

Related Issues (5)

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.