Skip to content

Commit

Permalink
Add the logger
Browse files Browse the repository at this point in the history
  • Loading branch information
Terryhung committed Apr 25, 2024
1 parent 3f047f6 commit fe0f79a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tasks/actorstate/miner/sector_deals.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ import (
minermodel "github.com/filecoin-project/lily/model/actors/miner"
"github.com/filecoin-project/lily/tasks/actorstate"
"github.com/filecoin-project/lily/tasks/actorstate/miner/extraction"
logging "github.com/ipfs/go-log/v2"
)

var logger = logging.Logger("lily/tasks/sectordeals")

type SectorDealsExtractor struct{}

func (SectorDealsExtractor) Extract(ctx context.Context, a actorstate.ActorInfo, node actorstate.ActorStateAPI) (model.Persistable, error) {
Expand Down Expand Up @@ -58,6 +61,11 @@ func ExtractSectorDealsModel(ctx context.Context, ec extraction.State) (minermod
for i := range sectorChanges.Snapped {
sectors = append(sectors, &sectorChanges.Snapped[i].To)
}
logger.Errorf("Get the number of sector changes: added %v", len(sectorChanges.Added))
logger.Errorf("Get the number of sector changes: snapped %v", len(sectorChanges.Snapped))
logger.Errorf("Get the number of sector changes: extended %v", len(sectorChanges.Extended))
logger.Errorf("Get the number of sector changes: removed %v", len(sectorChanges.Removed))

}

for _, sector := range sectors {
Expand Down

0 comments on commit fe0f79a

Please sign in to comment.