craigcondit commented on PR #611: URL: https://github.com/apache/yunikorn-k8shim/pull/611#issuecomment-1593459843
> Ok, I did a re-review. Some parts are not entirely clear, it's difficult to understand what happens without comments. You can also consider using `Example*` functions which documents how the new logger approach should be used (filtering, parent loggers, etc). I'll try to add some more comments but I don't see the need for example functions. The original JIRA demonstrates this, and eventually all log statements will use the new form. Essentially: `log.Logger().Info(...)` becomes `log.Log(log.LogName).Info(...)` Everything else remains the same. The specific loggers will be subsystem-specific, and probably added to the codebase as we segregate things out. I don't want to do a high-level "dump everything by package" translation as I'd like there to be some thought given to organizing our loggers. The existing `log.Logger()` call remains in place for backwards compatibility. Depending on context (admission controller, shim, or core), this becomes equivalent to either `log.Log(log.Admission)`, `log.Log(log.K8Shim)` or `log.Log(log.Core)` respectively. Finally, `log.RootLogger()` provides the old behavior, but this is only exposed for initial configuration (i.e. passing the log reference to the core from the shim). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
