2013/7/15 Durchholz, Joachim <[email protected]>
> > 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. > I'll create a task for jOOQ 4.0. I'm sure there is room for a general logger namespace overhaul: https://github.com/jOOQ/jOOQ/issues/2644 This task needs to be scheduled for a major release, as changing all / most logging namespaces is an incompatible change according to semantic versioning (http://semver.org). 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. True, fixing namespaces to be more concise might render #2622 obsolete. Or - more likely - the two features might complement each other, if they're well-designed. Usually, when specifying logging levels in a logger configuration, you're doing that for the whole system. Sometimes, you want to enable logging just for an "area" in your application - e.g. the payment module, which can then use a different Configuration from the other modules. Cheers Lukas -- 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.
