> There is a pending feature request to improve
> customisability of logging in general:
> https://github.com/jOOQ/jOOQ/issues/2622

I think it's assuming things about logging that don't hold. You *can* influence 
what is actually being logged, simply by specifying different logging levels 
for different loggers.

If you find yourself logging more or less than you wanted, then your logger 
namespace isn't fine-grained enough. Or the namespace (sub-)boundaries at not 
at the best place.
Whatever the problem, remember that the logger namespace can be organized any 
way you want, and you can deviate from the Java package namespace if Java 
packages aren't the right boundaries.

In the worst case, if you have a helper function and you simply can't use a 
better design than letting the helper function log something, you can let the 
caller pass in its logger name and let the helper use a sub-logger. I.e. for a 
silly example:
  reformatSql(String logger, String sql) {
    if (sql == null) {
      getLogger(logger + ".reformatSql").warn(
        "Reinterpreting null as empty string");
      return "";
    }
    ...
  }


You also risk reinventing the wheel (monitoring and applying run-time 
configuration changes, for example), in an area that's not Jooq's core mission.

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to