Re: [jira] Commented: (CAY-1464) Improve QueryLogger to log more information

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Mon Aug 02 2010 - 09:59:48 UTC

  • Next message: Andrus Adamchik: "Re: getting closer to 3.0.1"

    On Aug 2, 2010, at 12:30 PM, Evgeny Ryabitskiy wrote:

    > * Looks like you patch will log all fetched objects? If this is the
    > * case, it is definitely a bad idea. There can be *lots* of them.
    >
    > Yes... I would suggest to separate this into several levels INFO and
    > DEBUG, DEBUG is for logging fetched objects.
    > If it's not applicable we could move it in another Logger
    > implementation.

    Yes please, let's make it a separate logger.

    > * What is the benefit of passing start time instead of time delta in
    > * the logger? IMO the "old" API was cleaner, separating time
    > measurement
    > * from logging.
    >
    > Benefit is that we shouldn't do startTime - endTime if Logging is
    > disabled. -2 Operations (getCurrTime for endTime and operator "-"), so
    > low CPU is used.
    > I know it's minor optimization... but still... :) Unfortunately API
    > become little bit less clear.

    Yep. In a case of negligible performance optimization vs. clean API I
    always vote for the later. That's what ORM is about :-)

    > * BTW, my other idea about was that we can define a very simple logger
    > API, while "advanced" loggers would take extra
    > * information about the current operation from the injectable
    > environment objects (or maybe from thread-bound Transaction).
    >
    > Maybe you are right and I could resolve Connection from thread-bound
    > Transaction.. but it's to much binded on this Transaction object...

    What do you mean "too much"?

    Andrus



    This archive was generated by hypermail 2.0.0 : Mon Aug 02 2010 - 10:00:22 UTC