Documentation ¶
Index ¶
- func LogMemoryStats(ctx context.Context)
- func LogTransactionCreated(transactionIdentifier *types.TransactionIdentifier)
- type Logger
- func (l *Logger) AddBlockStream(ctx context.Context, block *types.Block) error
- func (l *Logger) BalanceStream(ctx context.Context, balanceChanges []*parser.BalanceChange) error
- func (l *Logger) LogConstructionStatus(ctx context.Context, status *results.CheckConstructionStatus)
- func (l *Logger) LogDataStatus(ctx context.Context, status *results.CheckDataStatus)
- func (l *Logger) ReconcileFailureStream(ctx context.Context, reconciliationType string, ...) error
- func (l *Logger) ReconcileSuccessStream(ctx context.Context, reconciliationType string, ...) error
- func (l *Logger) RemoveBlockStream(ctx context.Context, block *types.BlockIdentifier) error
- func (l *Logger) TransactionStream(ctx context.Context, block *types.Block) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LogMemoryStats ¶ added in v0.5.5
LogMemoryStats logs memory usage information.
func LogTransactionCreated ¶ added in v0.5.0
func LogTransactionCreated( transactionIdentifier *types.TransactionIdentifier, )
LogTransactionCreated logs the hash of created transactions.
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger contains all logic to record validator output and benchmark a Rosetta Server.
func NewLogger ¶
func NewLogger( logDir string, logBlocks bool, logTransactions bool, logBalanceChanges bool, logReconciliation bool, ) *Logger
NewLogger constructs a new Logger.
func (*Logger) AddBlockStream ¶
AddBlockStream writes the next processed block to the end of the blockStreamFile output file.
func (*Logger) BalanceStream ¶
func (l *Logger) BalanceStream( ctx context.Context, balanceChanges []*parser.BalanceChange, ) error
BalanceStream writes a slice of storage.BalanceChanges to the balanceStreamFile.
func (*Logger) LogConstructionStatus ¶ added in v0.5.6
func (l *Logger) LogConstructionStatus( ctx context.Context, status *results.CheckConstructionStatus, )
LogConstructionStatus logs results.CheckConstructionStatus.
func (*Logger) LogDataStatus ¶ added in v0.5.6
func (l *Logger) LogDataStatus(ctx context.Context, status *results.CheckDataStatus)
LogDataStatus logs results.CheckDataStatus.
func (*Logger) ReconcileFailureStream ¶
func (l *Logger) ReconcileFailureStream( ctx context.Context, reconciliationType string, account *types.AccountIdentifier, currency *types.Currency, computedBalance string, liveBalance string, block *types.BlockIdentifier, ) error
ReconcileFailureStream logs all reconciliation checks performed during syncing.
func (*Logger) ReconcileSuccessStream ¶
func (l *Logger) ReconcileSuccessStream( ctx context.Context, reconciliationType string, account *types.AccountIdentifier, currency *types.Currency, balance string, block *types.BlockIdentifier, ) error
ReconcileSuccessStream logs all reconciliation checks performed during syncing.
func (*Logger) RemoveBlockStream ¶
RemoveBlockStream writes the next processed block to the end of the blockStreamFile output file.