Skip to content

Add helper for formatting ledger sequence and timestamp together in structured log fields #540

Description

@Chucks1093

Summary

Many log entries include both a ledger sequence number and a timestamp. These two fields are currently formatted inconsistently across different log sites. A shared helper that produces a standard log-friendly object for the ledger context should be used everywhere both fields appear together.

Scope

  • Add ledgerLogContext(ledger: number, timestamp: Date): { ledger_sequence: number, ledger_timestamp: string } helper
  • Timestamp formatted as ISO 8601 UTC string
  • Add unit tests for: known ledger and timestamp produces expected output, timestamp is UTC not local time

Acceptance Criteria

  • Output contains ledger_sequence and ledger_timestamp fields
  • Timestamp is ISO 8601 UTC format
  • Unit tests confirm both fields

ETA: 12 hours


Coordinate on Telegram

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions