Skip to content

Commit

Permalink
chore(log): Prepend resource type to pod name
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe565 committed Oct 5, 2023
1 parent e76489e commit b3118d6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion internal/actions/dump/dump.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ func (action Dump) Run(ctx context.Context) (err error) {
}

log.WithFields(log.Fields{
"pod": action.Pod.Name,
"namespace": action.Client.Namespace,
"name": "pod/" + action.Pod.Name,
"file": action.Filename,
}).Info("exporting database")

Expand Down
2 changes: 1 addition & 1 deletion internal/actions/exec/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type Exec struct {
func (action Exec) Run(ctx context.Context) error {
log.WithFields(log.Fields{
"namespace": action.Client.Namespace,
"pod": action.Pod.Name,
"name": "pod/" + action.Pod.Name,
}).Info("exec into pod")

t := term.TTY{
Expand Down
2 changes: 1 addition & 1 deletion internal/actions/port_forward/port_forward.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type PortForward struct {
func (a PortForward) Run(ctx context.Context) error {
log.WithFields(log.Fields{
"namespace": a.Client.Namespace,
"pod": a.Pod.Name,
"name": "pod/" + a.Pod.Name,
}).Info("setting up port forward")

path := fmt.Sprintf(
Expand Down
2 changes: 1 addition & 1 deletion internal/actions/restore/restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func (action Restore) Run(ctx context.Context) (err error) {
log.WithFields(log.Fields{
"file": action.Filename,
"namespace": action.Client.Namespace,
"pod": action.Pod.Name,
"name": "pod/" + action.Pod.Name,
}).Info("ready to restore database")

startTime := time.Now()
Expand Down

0 comments on commit b3118d6

Please sign in to comment.