Skip to content

Commit

Permalink
Fix the log issue.
Browse files Browse the repository at this point in the history
Signed-off-by: Ye Cao <[email protected]>
  • Loading branch information
dashanji committed Feb 19, 2024
1 parent e5e0a97 commit c85cca3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ To deploy Kedro pipelines on Kubernetes, you must have a kubernetes cluster.
If you already have a K8s cluster, just skip this section and continue
on deploying.

We recommend `kind v0.10.0 <https://kind.sigs.k8s.io/>`_ to create a multi-node
We recommend `kind v0.13.0 <https://kind.sigs.k8s.io/>`_ to create a multi-node
Kubernetes cluster on your local machine as follows:

.. code:: bash
Expand Down
6 changes: 5 additions & 1 deletion go/vineyard/pkg/common/log/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,12 @@ func SetLogger(l Logger) {
func FromContext(ctx context.Context, keysAndValues ...any) Logger {
log := Log.Logger
if ctx != nil {
log = logr.FromContext(ctx)
logWithCtx := logr.FromContext(ctx)
if logWithCtx != nil {
log = logWithCtx
}
}

return Logger{log.WithValues(keysAndValues...)}
}

Expand Down
5 changes: 4 additions & 1 deletion k8s/pkg/log/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,10 @@ func SetLogger(l Logger) {
func FromContext(ctx context.Context, keysAndValues ...any) Logger {
log := Log.Logger
if ctx != nil {
log = logr.FromContext(ctx)
logWithCtx := logr.FromContext(ctx)
if logWithCtx != nil {
log = logWithCtx
}
}
return Logger{log.WithValues(keysAndValues...)}
}
Expand Down

0 comments on commit c85cca3

Please sign in to comment.