Start implementing a logger
This commit is contained in:
parent
bcd62301e3
commit
58065228e7
@ -192,13 +192,17 @@ func (e *EnvironmentsServer) Get(ctx context.Context, in *proto.GetOptions) (*pr
|
||||
}
|
||||
|
||||
func (e *EnvironmentsServer) List(in *proto.ListOptions, stream proto.Environments_ListServer) error {
|
||||
log := e.logInstance
|
||||
log.WithValues("user_id", in.GetOwnerId().GetUuid())
|
||||
ctx := logr.NewContext(stream.Context(), log)
|
||||
|
||||
environment := &controllers.Environemnt{
|
||||
UserID: in.GetOwnerId().GetUuid(),
|
||||
Controller: e.controller,
|
||||
Token: in.GetToken().GetToken(),
|
||||
}
|
||||
|
||||
envs, err := environment.ListEnvs(stream.Context(), in.GetSearchString())
|
||||
envs, err := environment.ListEnvs(ctx, in.GetSearchString())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user