Repository: kubernetes-sigs/scheduler-plugins
Pull request #883 (2025-03-26 11:36:49)

chore: add more contextual logging info for plugins
<!--  Thanks for sending a pull request!  Here are some tips for you:

1. If this is your first time, please read our contributor guidelines: https://git.k8s.io/community/contributors/guide/first-contribution.md#your-first-contribution and developer guide https://git.k8s.io/community/contributors/devel/development.md#development-guide
2. Please label this pull request according to what type of issue you are addressing, especially if this is a release targeted pull request. For reference on required PR/issue labels, read here:
https://git.k8s.io/community/contributors/devel/sig-release/release.md#issuepr-kind-label
3. Ensure you have added or ran the appropriate tests for your PR: https://git.k8s.io/community/contributors/devel/sig-testing/testing.md
4. If you want *faster* PR reviews, read how: https://git.k8s.io/community/contributors/guide/pull-requests.md#best-practices-for-faster-reviews
5. If the PR is unfinished, see how to mark it: https://git.k8s.io/community/contributors/guide/pull-requests.md#marking-unfinished-pull-requests
-->

#### What type of PR is this?
/kind cleanup

<!--
Add one of the following kinds:
/kind bug
/kind cleanup
/kind documentation
/kind feature

Optionally add one or more of the following kinds if applicable:
/kind api-change
/kind deprecation
/kind failing-test
/kind flake
/kind regression
-->

#### What this PR does / why we need it:
- add more info in contextual logging

We instead init the contextual logging of the entire plugin in the `New` and store it in the struct. In addition, we inject the ExtensionPoint name into each plugin ExtensionPoint, such as filter score ....
I understand that this will make our debug more efficient.
#### Which issue(s) this PR fixes:
<!--
*Automatically closes linked issue when PR is merged.
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
_If PR is about `failing-tests or flakes`, please post the related issues/tests in a comment and do not use `Fixes`_*
-->
Fixes #

#### Special notes for your reviewer:

#### Does this PR introduce a user-facing change?
<!--
If no, just write "NONE" in the release-note block below.
If yes, a release note is required:
Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".

For more information on release notes see: https://git.k8s.io/community/contributors/guide/release-notes.md
-->
```release-note
None
```



Patch:
diff --git a/pkg/capacityscheduling/capacity_scheduling.go b/pkg/capacityscheduling/capacity_scheduling.go
index 75f235f5..f70fe3b3 100644
--- a/pkg/capacityscheduling/capacity_scheduling.go
+++ b/pkg/capacityscheduling/capacity_scheduling.go
@@ -58,6 +58,7 @@ func init() {
 // CapacityScheduling is a plugin that implements the mechanism of capacity scheduling.
 type CapacityScheduling struct {
 	sync.RWMutex
+	logger            klog.Logger
 	fh                framework.Handle
 	podLister         corelisters.PodLister
 	pdbLister         policylisters.PodDisruptionBudgetLister
@@ -119,7 +120,9 @@ func (c *CapacityScheduling) Name() string {
 
 // New initializes a new plugin and returns it.
 func New(ctx context.Context, obj runtime.Object, handle framework.Handle) (framework.Plugin, error) {
+	lh := klog.FromContext(ctx).WithValues("plugin", Name)
 	c := &CapacityScheduling{
+		logger:            lh,
 		fh:                handle,
 		elasticQuotaInfos: NewElasticQuotaInfos(),
 		podLister:         handle.SharedInformerFactory().Core().V1().Pods().Lister(),
@@ -289,7 +292,7 @@ func (c *CapacityScheduling) PreFilterExtensions() framework.PreFilterExtensions
 
 // AddPod from pre-computed data in cycleState.
 func (c *CapacityScheduling) AddPod(ctx context.Context, cycleState *framework.CycleState, podToSchedule *v1.Pod, podToAdd *framework.PodInfo, nodeInfo *framework.NodeInfo) *framework.Status {
-	logger := klog.FromContext(ctx)
+	logger := klog.FromContext(klog.NewContext(ctx, c.logger))
 
 	elasticQuotaSnapshotState, err := getElasticQuotaSnapshotState(cycleState)
 	if err != nil {
@@ -310,7 +313,7 @@ func (c *CapacityScheduling) AddPod(ctx context.Context, cycleState *framework.C
 
 // RemovePod from pre-computed data in cycleState.
 func (c *CapacityScheduling) RemovePod(ctx context.Context, cycleState *framework.CycleState, podToSchedule *v1.Pod, podToRemove *framework.PodInfo, nodeInfo *framework.NodeInfo) *framework.Status {
-	logger := klog.FromContext(ctx)
+	logger := klog.FromContext(klog.NewContext(ctx, c.logger))
 
 	elasticQuotaSnapshotState, err := getElasticQuotaSnapshotState(cycleState)
 	if err != nil {
@@ -341,8 +344,9 @@ func (c *CapacityScheduling) PostFilter(ctx context.Context, state *framework.Cy
 		PdbLister:  c.pdbLister,
 		State:      state,
 		Interface: &preemptor{
-			fh:    c.fh,
-			state: state,
+			logger: c.logger,
+			fh:     c.fh,
+			state:  state,
 		},
 	}
 
@@ -352,8 +356,7 @@ func (c *CapacityScheduling) PostFilter(ctx context.Context, state *framework.Cy
 func (c *CapacityScheduling) Reserve(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) *framework.Status {
 	c.Lock()
 	defer c.Unlock()
-
-	logger := klog.FromContext(ctx)
+	logger := klog.FromContext(klog.NewContext(ctx, c.logger)).WithValues("ExtensionPoint", "Reserve")
 
 	elasticQuotaInfo := c.elasticQuotaInfos[pod.Namespace]
 	if elasticQuotaInfo != nil {
@@ -382,8 +385,9 @@ func (c *CapacityScheduling) Unreserve(ctx context.Context, state *framework.Cyc
 }
 
 type preemptor struct {
-	fh    framework.Handle
-	state *framework.CycleState
+	logger klog.Logger
+	fh     framework.Handle
+	state  *framework.CycleState
 }
 
 func (p *preemptor) OrderedScoreFuncs(ctx context.Context, nodesToVictims map[string]*extenderv1.Victims) []func(node string) int64 {
@@ -409,7 +413,7 @@ func (p *preemptor) CandidatesToVictimsMap(candidates []preemption.Candidate) ma
 // We look at the node that is nominated for this pod and as long as there are
 // terminating pods on the node, we don't consider this for preempting more pods.
 func (p *preemptor) PodEligibleToPreemptOthers(pod *v1.Pod, nominatedNodeStatus *framework.Status) (bool, string) {
-	logger := klog.FromContext(context.TODO())
+	logger := p.logger
 
 	if pod.Spec.PreemptionPolicy != nil && *pod.Spec.PreemptionPolicy == v1.PreemptNever {
 		logger.V(5).Info("Pod is not eligible for preemption because of its preemptionPolicy", "pod", klog.KObj(pod), "preemptionPolicy", v1.PreemptNever)
@@ -492,7 +496,7 @@ func (p *preemptor) SelectVictimsOnNode(
 	nodeInfo *framework.NodeInfo,
 	pdbs []*policy.PodDisruptionBudget) ([]*v1.Pod, int, *framework.Status) {
 
-	logger := klog.FromContext(ctx)
+	logger := p.logger
 
 	elasticQuotaSnapshotState, err := getElasticQuotaSnapshotState(state)
 	if err != nil {
diff --git a/pkg/coscheduling/coscheduling.go b/pkg/coscheduling/coscheduling.go
index 1dcf8705..99d54b73 100644
--- a/pkg/coscheduling/coscheduling.go
+++ b/pkg/coscheduling/coscheduling.go
@@ -40,6 +40,7 @@ import (
 
 // Coscheduling is a plugin that schedules pods in a group.
 type Coscheduling struct {
+	logger           klog.Logger
 	frameworkHandler framework.Handle
 	pgMgr            core.Manager
 	scheduleTimeout  *time.Duration
@@ -62,7 +63,7 @@ const (
 // New initializes and returns a new Coscheduling plugin.
 func New(ctx context.Context, obj runtime.Object, handle framework.Handle) (framework.Plugin, error) {
 
-	lh := klog.FromContext(ctx)
+	lh := klog.FromContext(ctx).WithValues("plugin", Name)
 	lh.V(5).Info("creating new coscheduling plugin")
 
 	args, ok := obj.(*config.CoschedulingArgs)
@@ -91,6 +92,7 @@ func New(ctx context.Context, obj runtime.Object, handle framework.Handle) (fram
 		handle.SharedInformerFactory().Core().V1().Pods(),
 	)
 	plugin := &Coscheduling{
+		logger:           lh,
 		frameworkHandler: handle,
 		pgMgr:            pgMgr,
 		scheduleTimeout:  &scheduleTimeDuration,
@@ -144,7 +146,7 @@ func (cs *Coscheduling) Less(podInfo1, podInfo2 *framework.QueuedPodInfo) bool {
 // 1. Whether the PodGroup that the Pod belongs to is on the deny list.
 // 2. Whether the total number of pods in a PodGroup is less than its `minMember`.
 func (cs *Coscheduling) PreFilter(ctx context.Context, state *framework.CycleState, pod *v1.Pod) (*framework.PreFilterResult, *framework.Status) {
-	lh := klog.FromContext(ctx)
+	lh := klog.FromContext(klog.NewContext(ctx, cs.logger)).WithValues("ExtensionPoint", "PreFilter")
 	// If PreFilter fails, return framework.UnschedulableAndUnresolvable to avoid
 	// any preemption attempts.
 	if err := cs.pgMgr.PreFilter(ctx, pod); err != nil {
@@ -157,7 +159,7 @@ func (cs *Coscheduling) PreFilter(ctx context.Context, state *framework.CycleSta
 // PostFilter is used to reject a group of pods if a pod does not pass PreFilter or Filter.
 func (cs *Coscheduling) PostFilter(ctx context.Context, state *framework.CycleState, pod *v1.Pod,
 	filteredNodeStatusMap framework.NodeToStatusMap) (*framework.PostFilterResult, *framework.Status) {
-	lh := klog.FromContext(ctx)
+	lh := klog.FromContext(klog.NewContext(ctx, cs.logger)).WithValues("ExtensionPoint", "PostFilter")
 	pgName, pg := cs.pgMgr.GetPodGroup(ctx, pod)
 	if pg == nil {
 		lh.V(4).Info("Pod does not belong to any group", "pod", klog.KObj(pod))
@@ -210,7 +212,7 @@ func (cs *Coscheduling) PreFilterExtensions() framework.PreFilterExtensions {
 
 // Permit is the functions invoked by the framework at "Permit" extension point.
 func (cs *Coscheduling) Permit(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) (*framework.Status, time.Duration) {
-	lh := klog.FromContext(ctx)
+	lh := klog.FromContext(klog.NewContext(ctx, cs.logger)).WithValues("ExtensionPoint", "Permit")
 	waitTime := *cs.scheduleTimeout
 	s := cs.pgMgr.Permit(ctx, state, pod)
 	var retStatus *framework.Status
@@ -251,7 +253,7 @@ func (cs *Coscheduling) Reserve(ctx context.Context, state *framework.CycleState
 
 // Unreserve rejects all other Pods in the PodGroup when one of the pods in the group times out.
 func (cs *Coscheduling) Unreserve(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) {
-	lh := klog.FromContext(ctx)
+	lh := klog.FromContext(klog.NewContext(ctx, cs.logger)).WithValues("ExtensionPoint", "Unreserve")
 	pgName, pg := cs.pgMgr.GetPodGroup(ctx, pod)
 	if pg == nil {
 		return
diff --git a/pkg/networkaware/networkoverhead/networkoverhead.go b/pkg/networkaware/networkoverhead/networkoverhead.go
index f214987e..6d763e52 100644
--- a/pkg/networkaware/networkoverhead/networkoverhead.go
+++ b/pkg/networkaware/networkoverhead/networkoverhead.go
@@ -73,7 +73,7 @@ func init() {
 // NetworkOverhead : Filter and Score nodes based on Pod's AppGroup requirements: MaxNetworkCosts requirements among Pods with dependencies
 type NetworkOverhead struct {
 	client.Client
-
+	logger      klog.Logger
 	podLister   corelisters.PodLister
 	handle      framework.Handle
 	namespaces  []string
@@ -140,7 +140,7 @@ func (no *NetworkOverhead) ScoreExtensions() framework.ScoreExtensions {
 
 // New : create an instance of a NetworkOverhead plugin
 func New(ctx context.Context, obj runtime.Object, handle framework.Handle) (framework.Plugin, error) {
-	logger := klog.FromContext(ctx)
+	logger := klog.FromContext(ctx).WithValues("plugin", Name)
 	logger.V(4).Info("Creating new instance of the NetworkOverhead plugin")
 
 	args, err := getArgs(obj)
@@ -155,8 +155,8 @@ func New(ctx context.Context, obj runtime.Object, handle framework.Handle) (fram
 	}
 
 	no := &NetworkOverhead{
-		Client: client,
-
+		Client:      client,
+		logger:      logger,
 		podLister:   handle.SharedInformerFactory().Core().V1().Pods().Lister(),
 		handle:      handle,
 		namespaces:  args.Namespaces,
@@ -178,7 +178,7 @@ func (no *NetworkOverhead) PreFilter(ctx context.Context, state *framework.Cycle
 	preFilterState := &PreFilterState{
 		scoreEqually: true,
 	}
-	logger := klog.FromContext(ctx)
+	logger := klog.FromContext(klog.NewContext(ctx, no.logger)).WithValues("ExtensionPoint", "PreFilter")
 
 	// Write initial status
 	state.Write(preFilterStateKey, preFilterState)
@@ -190,10 +190,10 @@ func (no *NetworkOverhead) PreFilter(ctx context.Context, state *framework.Cycle
 	}
 
 	// Get AppGroup CR
-	appGroup := no.findAppGroupNetworkOverhead(ctx, logger, agName)
+	appGroup := no.findAppGroupNetworkOverhead(ctx, agName)
 
 	// Get NetworkTopology CR
-	networkTopology := no.findNetworkTopologyNetworkOverhead(ctx, logger)
+	networkTopology := no.findNetworkTopologyNetworkOverhead(ctx)
 
 	// Sort Costs if manual weights were selected
 	no.sortNetworkTopologyCosts(networkTopology)
@@ -273,7 +273,7 @@ func (no *NetworkOverhead) PreFilter(ctx context.Context, state *framework.Cycle
 		logger.V(6).Info("Number of dependencies", "satisfied", satisfied, "violated", violated)
 
 		// Get accumulated cost based on pod dependencies
-		cost, ok := no.getAccumulatedCost(logger, scheduledList, dependencyList, nodeInfo.Node().Name, region, zone, costMap)
+		cost, ok := no.getAccumulatedCost(scheduledList, dependencyList, nodeInfo.Node().Name, region, zone, costMap)
 		if ok != nil {
 			return nil, framework.NewStatus(framework.Error, fmt.Sprintf("getting pod hostname from Snapshot: %v", ok))
 		}
@@ -332,7 +332,7 @@ func (no *NetworkOverhead) Filter(ctx context.Context,
 	if nodeInfo.Node() == nil {
 		return framework.NewStatus(framework.Error, "node not found")
 	}
-	logger := klog.FromContext(ctx)
+	logger := klog.FromContext(klog.NewContext(ctx, no.logger)).WithValues("ExtensionPoint", "Filter")
 
 	// Get PreFilterState
 	preFilterState, err := getPreFilterState(cycleState)
@@ -367,7 +367,7 @@ func (no *NetworkOverhead) Score(ctx context.Context,
 	nodeName string) (int64, *framework.Status) {
 	score := framework.MinNodeScore
 
-	logger := klog.FromContext(ctx)
+	logger := klog.FromContext(klog.NewContext(ctx, no.logger)).WithValues("ExtensionPoint", "Score")
 	// Get PreFilterState
 	preFilterState, err := getPreFilterState(cycleState)
 	if err != nil {
@@ -391,7 +391,7 @@ func (no *NetworkOverhead) NormalizeScore(ctx context.Context,
 	state *framework.CycleState,
 	pod *corev1.Pod,
 	scores framework.NodeScoreList) *framework.Status {
-	logger := klog.FromContext(ctx)
+	logger := klog.FromContext(klog.NewContext(ctx, no.logger)).WithValues("ExtensionPoint", "NormalizeScore")
 	logger.V(4).Info("before normalization: ", "scores", scores)
 
 	// Get Min and Max Scores to normalize between framework.MaxNodeScore and framework.MinNodeScore
@@ -575,7 +575,6 @@ func checkMaxNetworkCostRequirements(
 
 // getAccumulatedCost : calculate the accumulated cost based on the Pod's dependencies
 func (no *NetworkOverhead) getAccumulatedCost(
-	logger klog.Logger,
 	scheduledList networkawareutil.ScheduledList,
 	dependencyList []agv1alpha1.DependenciesInfo,
 	nodeName string,
@@ -599,7 +598,7 @@ func (no *NetworkOverhead) getAccumulatedCost(
 				// Get NodeInfo from pod Hostname
 				podNodeInfo, err := no.handle.SnapshotSharedLister().NodeInfos().Get(podAllocated.Hostname)
 				if err != nil {
-					logger.Error(err, "getting pod hostname from Snapshot", "nodeInfo", podNodeInfo)
+					no.logger.Error(err, "getting pod hostname from Snapshot", "nodeInfo", podNodeInfo)
 					return cost, err
 				}
 				// Get zone and region from Pod Hostname
@@ -653,10 +652,10 @@ func getPreFilterState(cycleState *framework.CycleState) (*PreFilterState, error
 	return state, nil
 }
 
-func (no *NetworkOverhead) findAppGroupNetworkOverhead(ctx context.Context, logger klog.Logger, agName string) *agv1alpha1.AppGroup {
-	logger.V(6).Info("Debugging namespaces", "namespaces", no.namespaces)
+func (no *NetworkOverhead) findAppGroupNetworkOverhead(ctx context.Context, agName string) *agv1alpha1.AppGroup {
+	no.logger.V(6).Info("Debugging namespaces", "namespaces", no.namespaces)
 	for _, namespace := range no.namespaces {
-		logger.V(6).Info("appGroup CR", "namespace", namespace, "name", agName)
+		no.logger.V(6).Info("appGroup CR", "namespace", namespace, "name", agName)
 		// AppGroup could not be placed in several namespaces simultaneously
 		appGroup := &agv1alpha1.AppGroup{}
 		err := no.Get(ctx, client.ObjectKey{
@@ -664,7 +663,7 @@ func (no *NetworkOverhead) findAppGroupNetworkOverhead(ctx context.Context, logg
 			Name:      agName,
 		}, appGroup)
 		if err != nil {
-			logger.V(4).Error(err, "Cannot get AppGroup from AppGroupNamespaceLister:")
+			no.logger.V(4).Error(err, "Cannot get AppGroup from AppGroupNamespaceLister:")
 			continue
 		}
 		if appGroup != nil && appGroup.GetUID() != "" {
@@ -674,10 +673,10 @@ func (no *NetworkOverhead) findAppGroupNetworkOverhead(ctx context.Context, logg
 	return nil
 }
 
-func (no *NetworkOverhead) findNetworkTopologyNetworkOverhead(ctx context.Context, logger klog.Logger) *ntv1alpha1.NetworkTopology {
-	logger.V(6).Info("Debugging namespaces", "namespaces", no.namespaces)
+func (no *NetworkOverhead) findNetworkTopologyNetworkOverhead(ctx context.Context) *ntv1alpha1.NetworkTopology {
+	no.logger.V(6).Info("Debugging namespaces", "namespaces", no.namespaces)
 	for _, namespace := range no.namespaces {
-		logger.V(6).Info("networkTopology CR:", "namespace", namespace, "name", no.ntName)
+		no.logger.V(6).Info("networkTopology CR:", "namespace", namespace, "name", no.ntName)
 		// NetworkTopology could not be placed in several namespaces simultaneously
 		networkTopology := &ntv1alpha1.NetworkTopology{}
 		err := no.Get(ctx, client.ObjectKey{
@@ -685,7 +684,7 @@ func (no *NetworkOverhead) findNetworkTopologyNetworkOverhead(ctx context.Contex
 			Name:      no.ntName,
 		}, networkTopology)
 		if err != nil {
-			logger.V(4).Error(err, "Cannot get networkTopology from networkTopologyNamespaceLister:")
+			no.logger.V(4).Error(err, "Cannot get networkTopology from networkTopologyNamespaceLister:")
 			continue
 		}
 		if networkTopology != nil && networkTopology.GetUID() != "" {
diff --git a/pkg/networkaware/topologicalsort/topologicalsort.go b/pkg/networkaware/topologicalsort/topologicalsort.go
index a360347e..1b0cbe6d 100644
--- a/pkg/networkaware/topologicalsort/topologicalsort.go
+++ b/pkg/networkaware/topologicalsort/topologicalsort.go
@@ -50,6 +50,7 @@ func init() {
 // TopologicalSort : Sort pods based on their AppGroup and corresponding microservice dependencies
 type TopologicalSort struct {
 	client.Client
+	logger     klog.Logger
 	handle     framework.Handle
 	namespaces []string
 }
@@ -73,7 +74,7 @@ func getArgs(obj runtime.Object) (*pluginconfig.TopologicalSortArgs, error) {
 
 // New : create an instance of a TopologicalSort plugin
 func New(ctx context.Context, obj runtime.Object, handle framework.Handle) (framework.Plugin, error) {
-	logger := klog.FromContext(ctx)
+	logger := klog.FromContext(ctx).WithValues("plugin", Name)
 	logger.V(4).Info("Creating new instance of the TopologicalSort plugin")
 
 	args, err := getArgs(obj)
@@ -90,6 +91,7 @@ func New(ctx context.Context, obj runtime.Object, handle framework.Handle) (fram
 
 	pl := &TopologicalSort{
 		Client:     client,
+		logger:     logger,
 		handle:     handle,
 		namespaces: args.Namespaces,
 	}
@@ -103,7 +105,7 @@ func (ts *TopologicalSort) Less(pInfo1, pInfo2 *framework.QueuedPodInfo) bool {
 	p1AppGroup := networkawareutil.GetPodAppGroupLabel(pInfo1.Pod)
 	p2AppGroup := networkawareutil.GetPodAppGroupLabel(pInfo2.Pod)
 	ctx := context.TODO()
-	logger := klog.FromContext(ctx)
+	logger := ts.logger.WithValues("ExtensionPoint", "Less")
 
 	// If pods do not belong to an AppGroup, or being to different AppGroups, follow vanilla QoS Sort
 	if p1AppGroup != p2AppGroup || len(p1AppGroup) == 0 {
@@ -115,7 +117,7 @@ func (ts *TopologicalSort) Less(pInfo1, pInfo2 *framework.QueuedPodInfo) bool {
 	// Pods belong to the same appGroup, get the CR
 	logger.V(6).Info("Pods belong to the same AppGroup CR", "p1 name", pInfo1.Pod.Name, "p2 name", pInfo2.Pod.Name, "appGroup", p1AppGroup)
 	agName := p1AppGroup
-	appGroup := ts.findAppGroupTopologicalSort(ctx, logger, agName)
+	appGroup := ts.findAppGroupTopologicalSort(ctx, agName)
 
 	// Get labels from both pods
 	labelsP1 := pInfo1.Pod.GetLabels()
@@ -131,7 +133,8 @@ func (ts *TopologicalSort) Less(pInfo1, pInfo2 *framework.QueuedPodInfo) bool {
 	return orderP1 <= orderP2
 }
 
-func (ts *TopologicalSort) findAppGroupTopologicalSort(ctx context.Context, logger klog.Logger, agName string) *agv1alpha.AppGroup {
+func (ts *TopologicalSort) findAppGroupTopologicalSort(ctx context.Context, agName string) *agv1alpha.AppGroup {
+	logger := ts.logger
 	for _, namespace := range ts.namespaces {
 		logger.V(6).Info("appGroup CR", "namespace", namespace, "name", agName)
 		// AppGroup couldn't be placed in several namespaces simultaneously
diff --git a/pkg/noderesources/allocatable.go b/pkg/noderesources/allocatable.go
index 052a6a33..dfc8c16e 100644
--- a/pkg/noderesources/allocatable.go
+++ b/pkg/noderesources/allocatable.go
@@ -33,6 +33,7 @@ import (
 // Allocatable is a score plugin that favors nodes based on their allocatable
 // resources.
 type Allocatable struct {
+	logger klog.Logger
 	handle framework.Handle
 	resourceAllocationScorer
 }
@@ -59,7 +60,7 @@ func validateResources(resources []schedulerconfig.ResourceSpec) error {
 
 // Score invoked at the score extension point.
 func (alloc *Allocatable) Score(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) (int64, *framework.Status) {
-	logger := klog.FromContext(ctx)
+	logger := klog.FromContext(klog.NewContext(ctx, alloc.logger)).WithValues("ExtensionPoint", "Score")
 	nodeInfo, err := alloc.handle.SnapshotSharedLister().NodeInfos().Get(nodeName)
 	if err != nil {
 		return 0, framework.NewStatus(framework.Error, fmt.Sprintf("getting node %q from Snapshot: %v", nodeName, err))
@@ -79,7 +80,7 @@ func (alloc *Allocatable) ScoreExtensions() framework.ScoreExtensions {
 
 // NewAllocatable initializes a new plugin and returns it.
 func NewAllocatable(ctx context.Context, allocArgs runtime.Object, h framework.Handle) (framework.Plugin, error) {
-	logger := klog.FromContext(ctx)
+	logger := klog.FromContext(ctx).WithValues("plugin", AllocatableName)
 	// Start with default values.
 	mode := config.Least
 	resToWeightMap := defaultResourcesToWeightMap
@@ -110,6 +111,7 @@ func NewAllocatable(ctx context.Context, allocArgs runtime.Object, h framework.H
 	}
 
 	return &Allocatable{
+		logger: logger,
 		handle: h,
 		resourceAllocationScorer: resourceAllocationScorer{
 			Name:                AllocatableName,
diff --git a/pkg/noderesourcetopology/filter.go b/pkg/noderesourcetopology/filter.go
index f627d063..b0dbeb32 100644
--- a/pkg/noderesourcetopology/filter.go
+++ b/pkg/noderesourcetopology/filter.go
@@ -191,7 +191,8 @@ func (tm *TopologyMatch) Filter(ctx context.Context, cycleState *framework.Cycle
 
 	nodeName := nodeInfo.Node().Name
 
-	lh := klog.FromContext(ctx).WithValues(logging.KeyPod, klog.KObj(pod), logging.KeyPodUID, logging.PodUID(pod), logging.KeyNode, nodeName)
+	lh := klog.FromContext(klog.NewContext(ctx, tm.logger)).WithValues("ExtensionPoint", "Filter").
+		WithValues(logging.KeyPod, klog.KObj(pod), logging.KeyPodUID, logging.PodUID(pod), logging.KeyNode, nodeName)
 
 	lh.V(4).Info(logging.FlowBegin)
 	defer lh.V(4).Info(logging.FlowEnd)
diff --git a/pkg/noderesourcetopology/plugin.go b/pkg/noderesourcetopology/plugin.go
index 527f9907..4a506e73 100644
--- a/pkg/noderesourcetopology/plugin.go
+++ b/pkg/noderesourcetopology/plugin.go
@@ -53,6 +53,7 @@ type scoringFn func(logr.Logger, *v1.Pod, topologyv1alpha2.ZoneList) (int64, *fr
 
 // TopologyMatch plugin which run simplified version of TopologyManager's admit handler
 type TopologyMatch struct {
+	logger              klog.Logger
 	resourceToWeightMap resourceToWeightMap
 	nrtCache            nrtcache.Interface
 	scoreStrategyFunc   scoreStrategyFn
@@ -72,7 +73,7 @@ func (tm *TopologyMatch) Name() string {
 
 // New initializes a new plugin and returns it.
 func New(ctx context.Context, args runtime.Object, handle framework.Handle) (framework.Plugin, error) {
-	lh := klog.FromContext(ctx)
+	lh := klog.FromContext(ctx).WithValues("plugin", Name)
 
 	lh.V(5).Info("creating new noderesourcetopology plugin")
 	tcfg, ok := args.(*apiconfig.NodeResourceTopologyMatchArgs)
@@ -106,6 +107,7 @@ func New(ctx context.Context, args runtime.Object, handle framework.Handle) (fra
 	}
 
 	topologyMatch := &TopologyMatch{
+		logger:              lh,
 		resourceToWeightMap: resToWeightMap,
 		nrtCache:            nrtCache,
 		scoreStrategyFunc:   strategy,
diff --git a/pkg/noderesourcetopology/postbind.go b/pkg/noderesourcetopology/postbind.go
index be076342..3cb567f3 100644
--- a/pkg/noderesourcetopology/postbind.go
+++ b/pkg/noderesourcetopology/postbind.go
@@ -26,7 +26,8 @@ import (
 )
 
 func (tm *TopologyMatch) PostBind(ctx context.Context, state *framework.CycleState, pod *corev1.Pod, nodeName string) {
-	lh := klog.FromContext(ctx).WithValues(logging.KeyPod, klog.KObj(pod), logging.KeyPodUID, logging.PodUID(pod), logging.KeyNode, nodeName)
+	lh := klog.FromContext(klog.NewContext(ctx, tm.logger)).WithValues("ExtensionPoint", "PostBind").
+		WithValues(logging.KeyPod, klog.KObj(pod), logging.KeyPodUID, logging.PodUID(pod), logging.KeyNode, nodeName)
 	lh.V(4).Info(logging.FlowBegin)
 	defer lh.V(4).Info(logging.FlowEnd)
 
diff --git a/pkg/noderesourcetopology/reserve.go b/pkg/noderesourcetopology/reserve.go
index 7f1588c4..4b48c9a1 100644
--- a/pkg/noderesourcetopology/reserve.go
+++ b/pkg/noderesourcetopology/reserve.go
@@ -27,7 +27,8 @@ import (
 
 func (tm *TopologyMatch) Reserve(ctx context.Context, state *framework.CycleState, pod *corev1.Pod, nodeName string) *framework.Status {
 	// the scheduler framework will add the node/name key/value pair
-	lh := klog.FromContext(ctx).WithValues(logging.KeyPod, klog.KObj(pod), logging.KeyPodUID, logging.PodUID(pod))
+	lh := klog.FromContext(klog.NewContext(ctx, tm.logger)).WithValues("ExtensionPoint", "Reserve").
+		WithValues(logging.KeyPod, klog.KObj(pod), logging.KeyPodUID, logging.PodUID(pod), logging.KeyNode, nodeName)
 	lh.V(4).Info(logging.FlowBegin)
 	defer lh.V(4).Info(logging.FlowEnd)
 
diff --git a/pkg/noderesourcetopology/score.go b/pkg/noderesourcetopology/score.go
index e82c9a76..7b6472d3 100644
--- a/pkg/noderesourcetopology/score.go
+++ b/pkg/noderesourcetopology/score.go
@@ -62,7 +62,8 @@ func (rw resourceToWeightMap) weight(r v1.ResourceName) int64 {
 
 func (tm *TopologyMatch) Score(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) (int64, *framework.Status) {
 	// the scheduler framework will add the node/name key/value pair
-	lh := klog.FromContext(ctx).WithValues(logging.KeyPod, klog.KObj(pod), logging.KeyPodUID, logging.PodUID(pod))
+	lh := klog.FromContext(klog.NewContext(ctx, tm.logger)).WithValues("ExtensionPoint", "Score").
+		WithValues(logging.KeyPod, klog.KObj(pod), logging.KeyPodUID, logging.PodUID(pod), logging.KeyNode, nodeName)
 
 	lh.V(4).Info(logging.FlowBegin)
 	defer lh.V(4).Info(logging.FlowEnd)
diff --git a/pkg/preemptiontoleration/preemption_toleration.go b/pkg/preemptiontoleration/preemption_toleration.go
index bf3ebd2e..a4cd4bd5 100644
--- a/pkg/preemptiontoleration/preemption_toleration.go
+++ b/pkg/preemptiontoleration/preemption_toleration.go
@@ -44,6 +44,7 @@ import (
 	"k8s.io/kubernetes/pkg/scheduler/metrics"
 	"k8s.io/kubernetes/pkg/scheduler/util"
 	"k8s.io/utils/clock"
+
 	"sigs.k8s.io/scheduler-plugins/apis/config"
 )
 
@@ -59,6 +60,7 @@ var (
 
 // PreemptionToleration is a PostFilter plugin implements the preemption logic.
 type PreemptionToleration struct {
+	logger              klog.Logger
 	fh                  framework.Handle
 	args                config.PreemptionTolerationArgs
 	podLister           corelisters.PodLister
@@ -79,17 +81,19 @@ func (pl *PreemptionToleration) Name() string {
 }
 
 // New initializes a new plugin and returns it.
-func New(_ context.Context, rawArgs runtime.Object, fh framework.Handle) (framework.Plugin, error) {
+func New(ctx context.Context, rawArgs runtime.Object, fh framework.Handle) (framework.Plugin, error) {
 	args, ok := rawArgs.(*config.PreemptionTolerationArgs)
 	if !ok {
 		return nil, fmt.Errorf("got args of type %T, want *PreemptionTolerationArgs", args)
 	}
+	logger := klog.FromContext(ctx).WithValues("plugin", Name)
 
 	if err := validation.ValidateDefaultPreemptionArgs(field.NewPath(""), (*schedulerapisconfig.DefaultPreemptionArgs)(args)); err != nil {
 		return nil, err
 	}
 
 	pl := PreemptionToleration{
+		logger:              logger,
 		fh:                  fh,
 		args:                *args,
 		podLister:           fh.SharedInformerFactory().Core().V1().Pods().Lister(),
@@ -125,11 +129,11 @@ func (pl *PreemptionToleration) PostFilter(ctx context.Context, state *framework
 // The function is public because other plugin can evaluate preemption toleration policy
 // This would be useful other PostFilter plugin depends on the preemption toleration feature.
 func ExemptedFromPreemption(
+	logger klog.Logger,
 	victimCandidate, preemptor *v1.Pod,
 	pcLister schedulinglisters.PriorityClassLister,
 	now time.Time,
 ) (bool, error) {
-	logger := klog.FromContext(context.TODO())
 
 	if victimCandidate.Spec.PriorityClassName == "" {
 		return false, nil
@@ -190,7 +194,7 @@ func (pl *PreemptionToleration) SelectVictimsOnNode(
 	nodeInfo *framework.NodeInfo,
 	pdbs []*policy.PodDisruptionBudget) ([]*v1.Pod, int, *framework.Status) {
 	var potentialVictims []*framework.PodInfo
-	logger := klog.FromContext(ctx)
+	logger := pl.logger
 	removePod := func(rpi *framework.PodInfo) error {
 		if err := nodeInfo.RemovePod(logger, rpi.Pod); err != nil {
 			return err
@@ -219,7 +223,7 @@ func (pl *PreemptionToleration) SelectVictimsOnNode(
 		}
 
 		// For a pod with lower priority, check if it can be exempted from the preemption.
-		exempted, err := ExemptedFromPreemption(pi.Pod, preemptor, pl.priorityClassLister, pl.curTime)
+		exempted, err := ExemptedFromPreemption(logger, pi.Pod, preemptor, pl.priorityClassLister, pl.curTime)
 		if err != nil {
 			logger.Error(err, "Encountered error while selecting victims on node", "Node", nodeInfo.Node().Name)
 			return nil, 0, framework.AsStatus(err)
@@ -333,7 +337,7 @@ func (pl *PreemptionToleration) calculateNumCandidates(numNodes int32) int32 {
 // We look at the node that is nominated for this pod and as long as there are
 // terminating pods on the node, we don't consider this for preempting more pods.
 func (pl *PreemptionToleration) PodEligibleToPreemptOthers(pod *v1.Pod, nominatedNodeStatus *framework.Status) (bool, string) {
-	logger := klog.FromContext(context.TODO())
+	logger := pl.logger
 	if pod.Spec.PreemptionPolicy != nil && *pod.Spec.PreemptionPolicy == v1.PreemptNever {
 		logger.V(5).Info("Pod is not eligible for preemption because it has a preemptionPolicy of Never", "pod", klog.KObj(pod))
 		return false, "not eligible due to preemptionPolicy=Never."
diff --git a/pkg/sysched/sysched.go b/pkg/sysched/sysched.go
index 4f8359f1..e7b30ba2 100644
--- a/pkg/sysched/sysched.go
+++ b/pkg/sysched/sysched.go
@@ -25,6 +25,7 @@ import (
 )
 
 type SySched struct {
+	logger klog.Logger
 	handle framework.Handle
 	client client.Client
 	// Maintain state of what pods on each node
@@ -120,7 +121,8 @@ func (sc *SySched) readSPOProfileCR(name string, namespace string) (sets.Set[str
 // SPO is used to generate and input the seccomp profile to a pod
 // If a pod does not have a SPO seccomp profile, then an unconfined
 // system call set is return for the pod
-func (sc *SySched) getSyscalls(logger klog.Logger, pod *v1.Pod) sets.Set[string] {
+func (sc *SySched) getSyscalls(pod *v1.Pod) sets.Set[string] {
+	logger := sc.logger
 	r := sets.New[string]()
 
 	// read the seccomp profile from the security context of a pod
@@ -212,7 +214,8 @@ func (sc *SySched) Name() string {
 	return Name
 }
 
-func (sc *SySched) calcScore(logger klog.Logger, syscalls sets.Set[string]) int {
+func (sc *SySched) calcScore(syscalls sets.Set[string]) int {
+	logger := sc.logger
 	// Currently, score is not adjusted based on critical/cve syscalls.
 	// NOTE: weight W is hardcoded for now
 	// TODO: add critical/cve syscalls
@@ -229,7 +232,7 @@ func (sc *SySched) calcScore(logger klog.Logger, syscalls sets.Set[string]) int
 
 // Score invoked at the score extension point.
 func (sc *SySched) Score(ctx context.Context, cs *framework.CycleState, pod *v1.Pod, nodeName string) (int64, *framework.Status) {
-	logger := klog.FromContext(ctx)
+	logger := klog.FromContext(klog.NewContext(ctx, sc.logger)).WithValues("ExtensionPoint", "Score")
 	// Read directly from API server because cached state in SnapSharedLister not always up-to-date
 	// especially during initial scheduler start.
 	node, err := sc.handle.ClientSet().CoreV1().Nodes().Get(ctx, nodeName, metav1.GetOptions{})
@@ -237,7 +240,7 @@ func (sc *SySched) Score(ctx context.Context, cs *framework.CycleState, pod *v1.
 		return 0, nil
 	}
 
-	podSyscalls := sc.getSyscalls(logger, pod)
+	podSyscalls := sc.getSyscalls(pod)
 
 	// NOTE: this condition is true only when a pod does not
 	// have a syscall profile, or the unconfined syscall is
@@ -246,7 +249,7 @@ func (sc *SySched) Score(ctx context.Context, cs *framework.CycleState, pod *v1.
 		return math.MaxInt64, nil
 	}
 
-	_, hostSyscalls := sc.getHostSyscalls(logger, node.Name)
+	_, hostSyscalls := sc.getHostSyscalls(node.Name)
 
 	// when a host or node does not have any pods
 	// running, the extraneous syscall score is zero
@@ -255,28 +258,27 @@ func (sc *SySched) Score(ctx context.Context, cs *framework.CycleState, pod *v1.
 	}
 
 	diffSyscalls := hostSyscalls.Difference(podSyscalls)
-	totalDiffs := sc.calcScore(logger, diffSyscalls)
+	totalDiffs := sc.calcScore(diffSyscalls)
 
 	// add the difference existing pods will see if new Pod is added into this host
 	newHostSyscalls := hostSyscalls.Clone()
 	newHostSyscalls = newHostSyscalls.Union(podSyscalls)
 	for _, p := range sc.HostToPods[node.Name] {
-		podSyscalls = sc.getSyscalls(logger, p)
+		podSyscalls = sc.getSyscalls(p)
 		diffSyscalls = newHostSyscalls.Difference(podSyscalls)
-		totalDiffs += sc.calcScore(logger, diffSyscalls)
+		totalDiffs += sc.calcScore(diffSyscalls)
 	}
 
 	sc.ExSAvg = sc.ExSAvg + (float64(totalDiffs)-sc.ExSAvg)/float64(sc.ExSAvgCount)
 	sc.ExSAvgCount += 1
 
-	logger.V(10).Info("ExSAvg: ", sc.ExSAvg)
-	logger.V(10).Info("Score: ", "totalDiffs", totalDiffs, "pod", pod.Name, "node", nodeName)
+	logger.V(10).Info("Score: ", "totalDiffs", totalDiffs, "ExSAvg", sc.ExSAvg, "pod", pod.Name, "node", nodeName)
 
 	return int64(totalDiffs), nil
 }
 
 func (sc *SySched) NormalizeScore(ctx context.Context, state *framework.CycleState, pod *v1.Pod, scores framework.NodeScoreList) *framework.Status {
-	logger := klog.FromContext(ctx)
+	logger := klog.FromContext(klog.NewContext(ctx, sc.logger)).WithValues("ExtensionPoint", "NormalizeScore")
 	logger.V(10).Info("Original: ", "scores", scores, "pod", pod.Name)
 	ret := helper.DefaultNormalizeScore(framework.MaxNodeScore, true, scores)
 	logger.V(10).Info("Normalized: ", "scores", scores, "pod", pod.Name)
@@ -289,22 +291,22 @@ func (sc *SySched) ScoreExtensions() framework.ScoreExtensions {
 	return sc
 }
 
-func (sc *SySched) getHostSyscalls(logger klog.Logger, nodeName string) (int, sets.Set[string]) {
+func (sc *SySched) getHostSyscalls(nodeName string) (int, sets.Set[string]) {
 	count := 0
 	h, ok := sc.HostSyscalls[nodeName]
 	if !ok {
-		logger.V(5).Info(fmt.Sprintf("getHostSyscalls: no nodeName %s", nodeName))
+		sc.logger.V(5).Info(fmt.Sprintf("getHostSyscalls: no nodeName %s", nodeName))
 		return count, nil
 	}
 	return h.Len(), h
 }
 
-func (sc *SySched) updateHostSyscalls(logger klog.Logger, pod *v1.Pod) {
-	syscall := sc.getSyscalls(logger, pod)
+func (sc *SySched) updateHostSyscalls(pod *v1.Pod) {
+	syscall := sc.getSyscalls(pod)
 	sc.HostSyscalls[pod.Spec.NodeName] = sc.HostSyscalls[pod.Spec.NodeName].Union(syscall)
 }
 
-func (sc *SySched) addPod(logger klog.Logger, pod *v1.Pod) {
+func (sc *SySched) addPod(pod *v1.Pod) {
 	nodeName := pod.Spec.NodeName
 	name := pod.Name
 
@@ -313,7 +315,7 @@ func (sc *SySched) addPod(logger klog.Logger, pod *v1.Pod) {
 		sc.HostToPods[nodeName] = make([]*v1.Pod, 0)
 		sc.HostToPods[nodeName] = append(sc.HostToPods[nodeName], pod)
 		sc.HostSyscalls[nodeName] = sets.New[string]()
-		sc.updateHostSyscalls(logger, pod)
+		sc.updateHostSyscalls(pod)
 		return
 	}
 
@@ -324,23 +326,24 @@ func (sc *SySched) addPod(logger klog.Logger, pod *v1.Pod) {
 	}
 
 	sc.HostToPods[nodeName] = append(sc.HostToPods[nodeName], pod)
-	sc.updateHostSyscalls(logger, pod)
+	sc.updateHostSyscalls(pod)
 
 	return
 }
 
-func (sc *SySched) recomputeHostSyscalls(logger klog.Logger, pods []*v1.Pod) sets.Set[string] {
+func (sc *SySched) recomputeHostSyscalls(pods []*v1.Pod) sets.Set[string] {
 	syscalls := sets.New[string]()
 
 	for _, p := range pods {
-		syscall := sc.getSyscalls(logger, p)
+		syscall := sc.getSyscalls(p)
 		syscalls = syscalls.Union(syscall)
 	}
 
 	return syscalls
 }
 
-func (sc *SySched) removePod(logger klog.Logger, pod *v1.Pod) {
+func (sc *SySched) removePod(pod *v1.Pod) {
+	logger := sc.logger
 	nodeName := pod.Spec.NodeName
 
 	_, ok := sc.HostToPods[nodeName]
@@ -351,8 +354,8 @@ func (sc *SySched) removePod(logger klog.Logger, pod *v1.Pod) {
 	for i, p := range sc.HostToPods[nodeName] {
 		if p.Name == pod.Name {
 			sc.HostToPods[nodeName] = remove(sc.HostToPods[nodeName], i)
-			sc.HostSyscalls[nodeName] = sc.recomputeHostSyscalls(logger, sc.HostToPods[nodeName])
-			c, _ := sc.getHostSyscalls(logger, nodeName)
+			sc.HostSyscalls[nodeName] = sc.recomputeHostSyscalls(sc.HostToPods[nodeName])
+			c, _ := sc.getHostSyscalls(nodeName)
 			logger.V(5).Info("remaining ", "syscalls", c, "node", nodeName)
 			return
 		}
@@ -362,33 +365,33 @@ func (sc *SySched) removePod(logger klog.Logger, pod *v1.Pod) {
 }
 
 func (sc *SySched) podAdded(obj interface{}) {
-	logger := klog.FromContext(context.TODO())
+	logger := sc.logger
 	pod := obj.(*v1.Pod)
 
 	// Add already running pod to map
 	// This is for when our scheduler comes up after other pods
 	if pod.Status.Phase == v1.PodRunning {
 		logger.V(10).Info(fmt.Sprintf("POD ADDED: %s/%s phase: %s", pod.Namespace, pod.Name, pod.Status.Phase))
-		sc.addPod(logger, pod)
+		sc.addPod(pod)
 	}
 }
 
 func (sc *SySched) podUpdated(old, new interface{}) {
-	logger := klog.FromContext(context.TODO())
+	logger := sc.logger
 	pod := old.(*v1.Pod)
 
 	// Pod has been assigned to node, now can add to our map
 	if pod.Status.Phase == v1.PodPending && pod.Status.HostIP != "" {
 		logger.V(10).Info(fmt.Sprintf("POD UPDATED. %s/%s", pod.Namespace, pod.Name))
-		sc.addPod(logger, pod)
+		sc.addPod(pod)
 	}
 }
 
 func (sc *SySched) podDeleted(obj interface{}) {
-	logger := klog.FromContext(context.TODO())
+	logger := sc.logger
 	pod := obj.(*v1.Pod)
 	logger.V(10).Info(fmt.Sprintf("POD DELETED: %s/%s", pod.Namespace, pod.Name))
-	sc.removePod(logger, pod)
+	sc.removePod(pod)
 }
 
 // getArgs : returns the arguments for the SySchedArg plugin.
@@ -402,8 +405,9 @@ func getArgs(obj runtime.Object) (*pluginconfig.SySchedArgs, error) {
 }
 
 // New initializes a new plugin and returns it.
-func New(_ context.Context, obj runtime.Object, handle framework.Handle) (framework.Plugin, error) {
-	sc := SySched{handle: handle}
+func New(ctx context.Context, obj runtime.Object, handle framework.Handle) (framework.Plugin, error) {
+	logger := klog.FromContext(ctx).WithValues("plugin", Name)
+	sc := SySched{logger: logger, handle: handle}
 	sc.HostToPods = make(map[string][]*v1.Pod)
 	sc.HostSyscalls = make(map[string]sets.Set[string])
 	sc.ExSAvg = 0
diff --git a/pkg/trimaran/loadvariationriskbalancing/loadvariationriskbalancing.go b/pkg/trimaran/loadvariationriskbalancing/loadvariationriskbalancing.go
index 0a350f60..dec75cfe 100644
--- a/pkg/trimaran/loadvariationriskbalancing/loadvariationriskbalancing.go
+++ b/pkg/trimaran/loadvariationriskbalancing/loadvariationriskbalancing.go
@@ -23,9 +23,8 @@ package loadvariationriskbalancing
 import (
 	"context"
 	"fmt"
-	"math"
-
 	"github.com/paypal/load-watcher/pkg/watcher"
+	"math"
 
 	v1 "k8s.io/api/core/v1"
 	"k8s.io/apimachinery/pkg/runtime"
@@ -43,6 +42,7 @@ const (
 
 // LoadVariationRiskBalancing : scheduler plugin
 type LoadVariationRiskBalancing struct {
+	logger       klog.Logger
 	handle       framework.Handle
 	eventHandler *trimaran.PodAssignEventHandler
 	collector    *trimaran.Collector
@@ -53,7 +53,7 @@ var _ framework.ScorePlugin = &LoadVariationRiskBalancing{}
 
 // New : create an instance of a LoadVariationRiskBalancing plugin
 func New(ctx context.Context, obj runtime.Object, handle framework.Handle) (framework.Plugin, error) {
-	logger := klog.FromContext(ctx)
+	logger := klog.FromContext(ctx).WithValues("plugin", Name)
 	logger.V(4).Info("Creating new instance of the LoadVariationRiskBalancing plugin")
 	// cast object into plugin arguments object
 	args, ok := obj.(*pluginConfig.LoadVariationRiskBalancingArgs)
@@ -70,6 +70,7 @@ func New(ctx context.Context, obj runtime.Object, handle framework.Handle) (fram
 	podAssignEventHandler.AddToHandle(handle)
 
 	pl := &LoadVariationRiskBalancing{
+		logger:       logger,
 		handle:       handle,
 		eventHandler: podAssignEventHandler,
 		collector:    collector,
@@ -80,7 +81,7 @@ func New(ctx context.Context, obj runtime.Object, handle framework.Handle) (fram
 
 // Score : evaluate score for a node
 func (pl *LoadVariationRiskBalancing) Score(ctx context.Context, cycleState *framework.CycleState, pod *v1.Pod, nodeName string) (int64, *framework.Status) {
-	logger := klog.FromContext(ctx)
+	logger := klog.FromContext(klog.NewContext(ctx, pl.logger)).WithValues("ExtensionPoint", "Score")
 	logger.V(6).Info("Calculating score", "pod", klog.KObj(pod), "nodeName", nodeName)
 	score := framework.MinNodeScore
 	nodeInfo, err := pl.handle.SnapshotSharedLister().NodeInfos().Get(nodeName)
diff --git a/pkg/trimaran/lowriskovercommitment/lowriskovercommitment.go b/pkg/trimaran/lowriskovercommitment/lowriskovercommitment.go
index 8516af65..e0708de6 100644
--- a/pkg/trimaran/lowriskovercommitment/lowriskovercommitment.go
+++ b/pkg/trimaran/lowriskovercommitment/lowriskovercommitment.go
@@ -51,6 +51,7 @@ const (
 
 // LowRiskOverCommitment : scheduler plugin
 type LowRiskOverCommitment struct {
+	logger              klog.Logger
 	handle              framework.Handle
 	collector           *trimaran.Collector
 	args                *pluginConfig.LowRiskOverCommitmentArgs
@@ -59,7 +60,7 @@ type LowRiskOverCommitment struct {
 
 // New : create an instance of a LowRiskOverCommitment plugin
 func New(ctx context.Context, obj runtime.Object, handle framework.Handle) (framework.Plugin, error) {
-	logger := klog.FromContext(ctx)
+	logger := klog.FromContext(ctx).WithValues("plugin", Name)
 	logger.V(4).Info("Creating new instance of the LowRiskOverCommitment plugin")
 	// cast object into plugin arguments object
 	args, ok := obj.(*pluginConfig.LowRiskOverCommitmentArgs)
@@ -81,6 +82,7 @@ func New(ctx context.Context, obj runtime.Object, handle framework.Handle) (fram
 		"riskLimitWeights", m)
 
 	pl := &LowRiskOverCommitment{
+		logger:              logger,
 		handle:              handle,
 		collector:           collector,
 		args:                args,
@@ -91,7 +93,7 @@ func New(ctx context.Context, obj runtime.Object, handle framework.Handle) (fram
 
 // PreScore : calculate pod requests and limits and store as plugin state data to be used during scoring
 func (pl *LowRiskOverCommitment) PreScore(ctx context.Context, cycleState *framework.CycleState, pod *v1.Pod, nodes []*framework.NodeInfo) *framework.Status {
-	logger := klog.FromContext(ctx)
+	logger := klog.FromContext(klog.NewContext(ctx, pl.logger)).WithValues("ExtensionPoint", "PreScore")
 	logger.V(6).Info("PreScore: Calculating pod resource requests and limits", "pod", klog.KObj(pod))
 	podResourcesStateData := CreatePodResourcesStateData(pod)
 	cycleState.Write(PodResourcesKey, podResourcesStateData)
@@ -100,7 +102,7 @@ func (pl *LowRiskOverCommitment) PreScore(ctx context.Context, cycleState *frame
 
 // Score : evaluate score for a node
 func (pl *LowRiskOverCommitment) Score(ctx context.Context, cycleState *framework.CycleState, pod *v1.Pod, nodeName string) (int64, *framework.Status) {
-	logger := klog.FromContext(ctx)
+	logger := klog.FromContext(klog.NewContext(ctx, pl.logger)).WithValues("ExtensionPoint", "Score")
 	logger.V(6).Info("Score: Calculating score", "pod", klog.KObj(pod), "nodeName", nodeName)
 	score := framework.MinNodeScore
 
diff --git a/pkg/trimaran/peaks/peaks.go b/pkg/trimaran/peaks/peaks.go
index adcd66bb..3e9a09ee 100644
--- a/pkg/trimaran/peaks/peaks.go
+++ b/pkg/trimaran/peaks/peaks.go
@@ -47,6 +47,7 @@ const (
 )
 
 type Peaks struct {
+	logger    klog.Logger
 	handle    framework.Handle
 	collector *trimaran.Collector
 	args      *config.PeaksArgs
@@ -76,7 +77,7 @@ func initNodePowerModels(powerModel map[string]config.PowerModel) error {
 }
 
 func New(ctx context.Context, obj runtime.Object, handle framework.Handle) (framework.Plugin, error) {
-	logger := klog.FromContext(ctx)
+	logger := klog.FromContext(ctx).WithValues("plugin", Name)
 	logger.V(4).Info("Peaks plugin Input config %+v", obj)
 
 	args, ok := obj.(*config.PeaksArgs)
@@ -94,6 +95,7 @@ func New(ctx context.Context, obj runtime.Object, handle framework.Handle) (fram
 		return nil, err
 	}
 	pl := &Peaks{
+		logger:    logger,
 		handle:    handle,
 		collector: collector,
 		args:      args,
@@ -102,7 +104,7 @@ func New(ctx context.Context, obj runtime.Object, handle framework.Handle) (fram
 }
 
 func (pl *Peaks) Score(ctx context.Context, cycleState *framework.CycleState, pod *v1.Pod, nodeName string) (int64, *framework.Status) {
-	logger := klog.FromContext(ctx)
+	logger := klog.FromContext(klog.NewContext(ctx, pl.logger)).WithValues("ExtensionPoint", "Score")
 	score := framework.MinNodeScore
 
 	nodeInfo, err := pl.handle.SnapshotSharedLister().NodeInfos().Get(nodeName)
diff --git a/pkg/trimaran/targetloadpacking/targetloadpacking.go b/pkg/trimaran/targetloadpacking/targetloadpacking.go
index 79e85f4c..f942fa2d 100644
--- a/pkg/trimaran/targetloadpacking/targetloadpacking.go
+++ b/pkg/trimaran/targetloadpacking/targetloadpacking.go
@@ -53,6 +53,7 @@ var (
 )
 
 type TargetLoadPacking struct {
+	logger       klog.Logger
 	handle       framework.Handle
 	eventHandler *trimaran.PodAssignEventHandler
 	collector    *trimaran.Collector
@@ -62,7 +63,7 @@ type TargetLoadPacking struct {
 var _ framework.ScorePlugin = &TargetLoadPacking{}
 
 func New(ctx context.Context, obj runtime.Object, handle framework.Handle) (framework.Plugin, error) {
-	logger := klog.FromContext(ctx)
+	logger := klog.FromContext(ctx).WithValues("plugin", Name)
 	logger.V(4).Info("Creating new instance of the TargetLoadPacking plugin")
 	// cast object into plugin arguments object
 	args, ok := obj.(*pluginConfig.TargetLoadPackingArgs)
@@ -90,6 +91,7 @@ func New(ctx context.Context, obj runtime.Object, handle framework.Handle) (fram
 	podAssignEventHandler.AddToHandle(handle)
 
 	pl := &TargetLoadPacking{
+		logger:       logger,
 		handle:       handle,
 		eventHandler: podAssignEventHandler,
 		collector:    collector,
@@ -103,7 +105,7 @@ func (pl *TargetLoadPacking) Name() string {
 }
 
 func (pl *TargetLoadPacking) Score(ctx context.Context, cycleState *framework.CycleState, pod *v1.Pod, nodeName string) (int64, *framework.Status) {
-	logger := klog.FromContext(ctx)
+	logger := klog.FromContext(klog.NewContext(ctx, pl.logger)).WithValues("ExtensionPoint", "Score")
 	score := framework.MinNodeScore
 	nodeInfo, err := pl.handle.SnapshotSharedLister().NodeInfos().Get(nodeName)
 	if err != nil {


Test patch:
diff --git a/pkg/preemptiontoleration/preemption_toleration_test.go b/pkg/preemptiontoleration/preemption_toleration_test.go
index abb3ec98..82325357 100644
--- a/pkg/preemptiontoleration/preemption_toleration_test.go
+++ b/pkg/preemptiontoleration/preemption_toleration_test.go
@@ -19,6 +19,7 @@ package preemptiontoleration
 import (
 	"context"
 	"fmt"
+	"k8s.io/klog/v2"
 	"strings"
 	"testing"
 	"time"
@@ -225,6 +226,7 @@ func (tt testCase) run(t *testing.T) {
 		now = time.Now()
 	}
 	got, err := ExemptedFromPreemption(
+		klog.FromContext(context.Background()),
 		tt.victimCandidate, tt.preemptor,
 		informersFactory.Scheduling().V1().PriorityClasses().Lister(),
 		now,
diff --git a/pkg/sysched/sysched_test.go b/pkg/sysched/sysched_test.go
index 1eea8c39..2d765950 100644
--- a/pkg/sysched/sysched_test.go
+++ b/pkg/sysched/sysched_test.go
@@ -15,7 +15,6 @@ import (
 	clientsetfake "k8s.io/client-go/kubernetes/fake"
 	clientscheme "k8s.io/client-go/kubernetes/scheme"
 	restclient "k8s.io/client-go/rest"
-	"k8s.io/klog/v2"
 	"k8s.io/kubernetes/pkg/scheduler/framework"
 	"k8s.io/kubernetes/pkg/scheduler/framework/plugins/defaultbinder"
 	"k8s.io/kubernetes/pkg/scheduler/framework/plugins/queuesort"
@@ -313,8 +312,7 @@ func TestGetSyscalls(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
-			logger := klog.FromContext(context.TODO())
-			syscalls := sys.getSyscalls(logger, tt.pod)
+			syscalls := sys.getSyscalls(tt.pod)
 			assert.NotNil(t, syscalls)
 			assert.EqualValues(t, tt.expected, syscalls.Len())
 		})
@@ -336,8 +334,7 @@ func TestCalcScore(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
-			logger := klog.FromContext(context.TODO())
-			score := sys.calcScore(logger, tt.syscalls)
+			score := sys.calcScore(tt.syscalls)
 			assert.EqualValues(t, tt.expected, score)
 		})
 	}
@@ -355,7 +352,6 @@ func TestScore(t *testing.T) {
 	// fake out the framework handle
 	ctx, cancel := context.WithCancel(context.Background())
 	defer cancel()
-	logger := klog.FromContext(ctx)
 	fr, err := tf.NewFramework(ctx, registeredPlugins, Name,
 		frameworkruntime.WithClientSet(clientsetfake.NewSimpleClientset(node.Obj())))
 	if err != nil {
@@ -386,7 +382,7 @@ func TestScore(t *testing.T) {
 	sys.ExSAvg = 0
 	sys.ExSAvgCount = 0
 
-	sys.addPod(logger, pod)
+	sys.addPod(pod)
 
 	tests := []struct {
 		name     string
@@ -484,15 +480,14 @@ func TestGetHostSyscalls(t *testing.T) {
 
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
-			logger := klog.FromContext(context.TODO())
 			sys, _ := mockSysched()
 			sys.ExSAvgCount = 0
 
 			for i := range tt.pods {
-				sys.addPod(logger, tt.pods[i])
+				sys.addPod(tt.pods[i])
 			}
 
-			cnt, _ := sys.getHostSyscalls(logger, tt.nodeName)
+			cnt, _ := sys.getHostSyscalls(tt.nodeName)
 			assert.EqualValues(t, tt.expected, cnt)
 		})
 	}
@@ -530,7 +525,6 @@ func TestUpdateHostSyscalls(t *testing.T) {
 			// fake out the framework handle
 			ctx, cancel := context.WithCancel(context.Background())
 			defer cancel()
-			logger := klog.FromContext(ctx)
 			nodeItems := []v1.Node{}
 			for _, node := range tt.nodes {
 				nodeItems = append(nodeItems, *node)
@@ -566,13 +560,13 @@ func TestUpdateHostSyscalls(t *testing.T) {
 			sys.ExSAvgCount = 0
 
 			for i := range tt.basePods {
-				sys.addPod(logger, tt.basePods[i])
+				sys.addPod(tt.basePods[i])
 			}
 
 			for i := range tt.newPods {
-				sys.updateHostSyscalls(logger, tt.newPods[i])
+				sys.updateHostSyscalls(tt.newPods[i])
 			}
-			sc, _ := sys.getHostSyscalls(logger, "test")
+			sc, _ := sys.getHostSyscalls("test")
 			assert.EqualValues(t, tt.expected, sc)
 		})
 	}
@@ -598,9 +592,8 @@ func TestAddPod(t *testing.T) {
 
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
-			logger := klog.FromContext(context.TODO())
 			for i := range tt.pods {
-				sys.addPod(logger, tt.pods[i])
+				sys.addPod(tt.pods[i])
 			}
 			for i := range sys.HostToPods["test"] {
 				assert.EqualValues(t, tt.pods[i], sys.HostToPods["test"][i])
@@ -631,8 +624,7 @@ func TestRecomputeHostSyscalls(t *testing.T) {
 
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
-			logger := klog.FromContext(context.TODO())
-			syscalls := sys.recomputeHostSyscalls(logger, tt.pods)
+			syscalls := sys.recomputeHostSyscalls(tt.pods)
 			assert.EqualValues(t, tt.expected, len(syscalls))
 		})
 	}
@@ -664,13 +656,12 @@ func TestRemovePod(t *testing.T) {
 
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
-			logger := klog.FromContext(context.TODO())
 			for i := range tt.pods {
-				sys.addPod(logger, tt.pods[i])
+				sys.addPod(tt.pods[i])
 			}
 
 			for i := range tt.removePods {
-				sys.removePod(logger, tt.removePods[i])
+				sys.removePod(tt.removePods[i])
 			}
 
 			assert.EqualValues(t, tt.expectedPodNum, len(sys.HostToPods["test"]))
@@ -739,9 +730,8 @@ func TestPodUpdated(t *testing.T) {
 
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
-			logger := klog.FromContext(context.TODO())
 			for i := range tt.basePods {
-				sys.addPod(logger, tt.basePods[i])
+				sys.addPod(tt.basePods[i])
 			}
 
 			for i := range tt.updatedPods {
@@ -780,9 +770,8 @@ func TestPodDeleted(t *testing.T) {
 
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
-			logger := klog.FromContext(context.TODO())
 			for i := range tt.basePods {
-				sys.addPod(logger, tt.basePods[i])
+				sys.addPod(tt.basePods[i])
 			}
 
 			for i := range tt.deletedPods {