You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@yunikorn.apache.org by "Manikandan R (Jira)" <ji...@apache.org> on 2026/10/29 06:40:00 UTC
[jira] [Resolved] (YUNIKORN-3536) filteredCore.With() drops the per-logger level filter
[ https://issues.apache.org/jira/browse/YUNIKORN-3536?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Manikandan R resolved YUNIKORN-3536.
------------------------------------
Fix Version/s: 1.11.0
Target Version: 1.11.0
Resolution: Fixed
> filteredCore.With() drops the per-logger level filter
> -----------------------------------------------------
>
> Key: YUNIKORN-3536
> URL: https://issues.apache.org/jira/browse/YUNIKORN-3536
> Project: Apache YuniKorn
> Issue Type: Bug
> Components: core - common
> Reporter: YUNG_CHENG
> Assignee: YUNG_CHENG
> Priority: Minor
> Labels: pull-request-available
> Fix For: 1.11.0
>
>
> {\{filteredCore}} in \{{pkg/log/filtered_core.go}} applies the per-logger level (\{{log.<name>.level}}) by wrapping the zap core of each scoped logger. Its \{{With()}} method returns \{{f.inner.With(fields)}}, so the returned core is no longer wrapped. A logger derived with \{{log.Log(handle).With(...)}} ignores the level of that logger and only applies the level of the root zap logger.
> The root level is set to the finest level of all configured loggers. With \{{log.level=INFO}} and \{{log.core.scheduler.level=DEBUG}} the root core runs at DEBUG. \{{log.Log(log.Core).Debug()}} is filtered as expected, but \{{log.Log(log.Core).With(zap.String("key", "value")).Debug()}} is logged.
> No code in the core calls \{{With()}} on a scoped logger today, so there is no visible impact yet. Any new use of \{{With()}} would silently lose the level filter.
> *Proposed change*
> Return a \{{filteredCore}} that keeps the same level and wraps \{{f.inner.With(fields)}}. Add unit tests for \{{filteredCore}}: \{{With()}}, \{{Write()}} and \{{Sync()}} have no test coverage today.
> The k8shim has its own copy of \{{filteredCore}} in \{{pkg/log/filtered_core.go}} with the same \{{With()}} implementation.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@yunikorn.apache.org
For additional commands, e-mail: issues-help@yunikorn.apache.org