Datasources: Use context logger in cache service (#59547)

This commit is contained in:
Will Browne 2022-11-30 14:25:04 +01:00 committed by GitHub
parent c3d13a0e2f
commit 0fca3cf9dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -49,7 +49,7 @@ func (dc *CacheServiceImpl) GetDatasource(
}
}
dc.logger.Debug("Querying for data source via SQL store", "id", datasourceID, "orgId", user.OrgID)
dc.logger.FromContext(ctx).Debug("Querying for data source via SQL store", "id", datasourceID, "orgId", user.OrgID)
query := &datasources.GetDataSourceQuery{Id: datasourceID, OrgId: user.OrgID}
ss := SqlStore{db: dc.SQLStore, logger: dc.logger}
@ -90,7 +90,7 @@ func (dc *CacheServiceImpl) GetDatasourceByUID(
}
}
dc.logger.Debug("Querying for data source via SQL store", "uid", datasourceUID, "orgId", user.OrgID)
dc.logger.FromContext(ctx).Debug("Querying for data source via SQL store", "uid", datasourceUID, "orgId", user.OrgID)
query := &datasources.GetDataSourceQuery{Uid: datasourceUID, OrgId: user.OrgID}
ss := SqlStore{db: dc.SQLStore, logger: dc.logger}
err := ss.GetDataSource(ctx, query)