mirror of https://github.com/databricks/cli.git
Revert "Revert "Log process ID in each log entry (#949)""
This reverts commit 1d5980a11e
.
This commit is contained in:
parent
831ae571b2
commit
118cf027b1
|
@ -4,6 +4,7 @@ import (
|
|||
"context"
|
||||
"fmt"
|
||||
"log/slog"
|
||||
"os"
|
||||
|
||||
"github.com/databricks/cli/libs/cmdio"
|
||||
"github.com/databricks/cli/libs/env"
|
||||
|
@ -69,7 +70,7 @@ func (f *logFlags) initializeContext(ctx context.Context) (context.Context, erro
|
|||
return nil, err
|
||||
}
|
||||
|
||||
slog.SetDefault(slog.New(handler))
|
||||
slog.SetDefault(slog.New(handler).With(slog.Int("pid", os.Getpid())))
|
||||
return log.NewContext(ctx, slog.Default()), nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue