Skip to content

Commit

Permalink
Fix logger messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
francois2metz committed Dec 29, 2024
1 parent ffd04e7 commit 79c58ad
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ovh/table_ovh_log_self.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,14 @@ func getLogInfo(ctx context.Context, d *plugin.QueryData, h *plugin.HydrateData)

client, err := connect(ctx, d)
if err != nil {
plugin.Logger(ctx).Error("ovh_logs_self.getLogInfo", "connection_error", err)
plugin.Logger(ctx).Error("ovh_log_self.getLogInfo", "connection_error", err)
return nil, err
}

err = client.Get(fmt.Sprintf("/me/api/logs/self/%d", log.ID), &log)

if err != nil {
plugin.Logger(ctx).Error("ovh_logs_self.getLogInfo", err)
plugin.Logger(ctx).Error("ovh_log_self.getLogInfo", err)
return nil, err
}

Expand All @@ -102,15 +102,15 @@ func getLogInfo(ctx context.Context, d *plugin.QueryData, h *plugin.HydrateData)
func listLog(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) {
client, err := connect(ctx, d)
if err != nil {
plugin.Logger(ctx).Error("ovh_logs_self.listLog", "connection_error", err)
plugin.Logger(ctx).Error("ovh_log_self.listLog", "connection_error", err)
return nil, err
}

var logsId []int
err = client.Get("/me/api/logs/self", &logsId)

if err != nil {
plugin.Logger(ctx).Error("ovh_logs_self.listLog", err)
plugin.Logger(ctx).Error("ovh_log_self.listLog", err)
return nil, err
}

Expand Down

0 comments on commit 79c58ad

Please sign in to comment.